Skip to content

Instantly share code, notes, and snippets.

@seki
Last active September 22, 2015 08:15
Show Gist options
  • Save seki/a7a28e542f4fb82424c5 to your computer and use it in GitHub Desktop.
Save seki/a7a28e542f4fb82424c5 to your computer and use it in GitHub Desktop.

run server

% ruby -I../lib tiny_drb.rb

run client (irb)

% irb -r drb
irb(main):001:0> ro = DRbObject.new_with_uri('druby://localhost:12345')
irb(main):002:0> ro.hello(1, 2.0, "3")
=> ["hello", [1, 2.0, "3"]]
irb(main):003:0> 50.times.collect { Thread.new { ro.hello(ENV.to_hash.to_a * 10000) }}.each(&:join); nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment