Queue to the Future!
An easy way to create asynchronous execution paths in an unobtrusive way. Queue to the Future uses a managed pool of workers to keep overhead to a minimum.
Synopsis
require "queue_to_the_future"
# returns immediately
result = Future("list", "of", "args") do |*args|
sleep(1)
args.join(" ")
end
# blocks until completed
puts result #=> "list of args"
Copyright
Copyright © 2009-2010 Devin Christensen. See LICENSE for details.