Skip to content

Instantly share code, notes, and snippets.

@seki
Created November 27, 2009 19:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save seki/244201 to your computer and use it in GitHub Desktop.
require 'drb/drb'
DRb.start_service
queue = DRbObject.new_with_uri('druby://localhost:54320')
while true
p queue.pop
sleep(rand)
end
require 'drb/drb'
require 'thread'
DRb.start_service('druby://localhost:54320', Queue.new)
while true
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment