Skip to content

Instantly share code, notes, and snippets.

@kennethkalmer
Created May 21, 2009 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethkalmer/115178 to your computer and use it in GitHub Desktop.
Save kennethkalmer/115178 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'eventmachine'
$i = 0
EM.run {
3.times do |c|
EM.next_tick {
puts "#{c} : #{$i}"
$i += 1
sleep rand(10)
puts "#{c} : #{$i}"
}
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment