-
Notifications
You must be signed in to change notification settings - Fork 419
Closed
Labels
enhancementAdding features, adding tests, improving documentation.Adding features, adding tests, improving documentation.not-appliedThe bug/enhacement was closed and not fixed/implemented.The bug/enhacement was closed and not fixed/implemented.
Description
Hi guys!
I noticed that the implementation of Promise.all?
differs from that of JavaScript's Promise.all. It seems like Promise.all?
executes the promises in the argument consecutively, whereas JS's Promise.all executes them concurrently, and then resolves when all of them have completed.
Really simple examples to illustrate:
JS example: http://jsbin.com/?html,css,js,console
Ruby example:
def pr10
Concurrent::Promise.new{
puts "hi"
sleep 10
puts "bye"
}
end
Concurrent::Promise.all?(pr10,pr10).execute
Is there a reason for implementing it this way? I see that we are calling Promise.wait
in the implementation here. Thanks :)
Metadata
Metadata
Assignees
Labels
enhancementAdding features, adding tests, improving documentation.Adding features, adding tests, improving documentation.not-appliedThe bug/enhacement was closed and not fixed/implemented.The bug/enhacement was closed and not fixed/implemented.