Created
February 21, 2013 21:45
-
-
Save michaeljbishop/5008562 to your computer and use it in GitHub Desktop.
Another fix for the duplicate task-arguments problem.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Invoke all the prerequisites of a task in parallel. | |
def invoke_prerequisites_concurrently(task_args, invocation_chain) # :nodoc: | |
futures = prerequisite_tasks.collect do |p| | |
prereq_args = task_args.new_scope(p.arg_names) | |
# application.thread_pool.future(p) do |r| | |
# r.invoke_with_call_chain(prereq_args, invocation_chain) | |
# end | |
application.thread_pool.future do | |
p.invoke_with_call_chain(prereq_args, invocation_chain) | |
end | |
end | |
futures.each { |f| f.value } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment