Skip to content

Instantly share code, notes, and snippets.

@makevoid
Created July 1, 2013 14:41
Show Gist options
  • Select an option

  • Save makevoid/5901415 to your computer and use it in GitHub Desktop.

Select an option

Save makevoid/5901415 to your computer and use it in GitHub Desktop.
Celluloid test playground
require 'celluloid'
DB = { count: 0 }
class Actor
include Celluloid
def do_stuff
# sleep 1
DB[:count] += 1
puts DB[:count] if DB[:count] == 1000
end
end
2000.times do
actor = Actor.new
actor.async.do_stuff
end
puts "started!"
sleep 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment