Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"q.all(promises).then" versus "q.all(promises).spread" #795

Open
Torrriate opened this issue Nov 8, 2016 · 0 comments
Open

"q.all(promises).then" versus "q.all(promises).spread" #795

Torrriate opened this issue Nov 8, 2016 · 0 comments

Comments

@Torrriate
Copy link

If later on dynamically adding promises in time (before all promises are 'finalized') to the passed 'promises'-array the 'then'-method fires unlike the 'spread'-method already after the promises that were contained within the 'promises'-array during the evaluation of that statement ("q.all(promises).then(function(){...})") are resolved wheres the 'spread'-method takes the added ones into account.
As if the 'then'-method listened to the resolution of the 'copy' of the 'promises'-array whereas the 'spread'-method listened to its 'reference'.
I wouldn't be aware of that being a feature ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant