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

Update index.md #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update index.md #144

wants to merge 1 commit into from

Conversation

jeff-h
Copy link
Contributor

@jeff-h jeff-h commented May 15, 2020

Clarify an easy misconception regarding the usage of all.

Clarify an easy misconception regarding the usage of `all`.
@ykjchen
Copy link
Collaborator

ykjchen commented Aug 9, 2020

Thanks for the addition @jeff-h. What do you think about this:

Note that `all` does not control when each contained promise task starts (a promise task starts when that promise is created), nor when each promise is resolved (this depends on the length of the task). However, it does guarantee that the order of promises in the output array is identical to the order of promises passed to it in the input array.

This:

  1. makes the doc specific to all, since the comment is added in the all section (if the documentation is more general, perhaps the extensions section is more appropriate);
  2. clarifies that the order of the returned object is clearly defined;
  3. adds details on why -all: does not control order of resolution.

@jeff-h
Copy link
Contributor Author

jeff-h commented Aug 9, 2020

Hey — I like it. It provides more detail than my attempt & would certainly have alleviated my initial misunderstandings on this. TBH when my brain is in the right space the situation re all is self-evident, so anything in the docs that prompts a deeper think would do the trick :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants