This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
require File.dirname(__FILE__) + '/helper'
|
||||
|
||||
EM.run do
|
||||
array = (1..100).to_a
|
||||
|
||||
tickloop = EM.tick_loop do
|
||||
if array.empty?
|
||||
:stop
|
||||
else
|
||||
puts array.shift
|
||||
end
|
||||
end
|
||||
|
||||
tickloop.on_stop { EM.stop }
|
||||
end
|
||||
Reference in New Issue
Block a user