Skip to content

Commit

Permalink
Improve multitask performance
Browse files Browse the repository at this point in the history
  • Loading branch information
jsm committed Nov 5, 2018
1 parent 124a03b commit 137e3f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rake/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ def invoke_prerequisites_concurrently(task_args, invocation_chain)# :nodoc:
r.invoke_with_call_chain(prereq_args, invocation_chain)
end
end
futures.each(&:value)
# Iterate in reverse to improve performance related to thread waiting and switching
futures.reverse_each(&:value)
end

# Format the trace flags for display.
Expand Down

0 comments on commit 137e3f7

Please sign in to comment.