module MrDarcy::Drivers::Celluloid
Public Instance Methods
dispatch(&block)
click to toggle source
Create a new future, and add it to the future stack.
# File lib/mr_darcy/drivers/celluloid.rb, line 12 def dispatch(&block) futures << ::Celluloid::Future.new(&block) end
futures()
click to toggle source
Returns the future stack.
# File lib/mr_darcy/drivers/celluloid.rb, line 24 def futures @futures ||= [] end
wait()
click to toggle source
Iterate the future stack and wait for each to resolve.
# File lib/mr_darcy/drivers/celluloid.rb, line 17 def wait futures.each do |future| future.value end end