Skip to content

Commit

Permalink
Mention .all() promise fulfillment order.
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronAcerboni authored and domenic committed Mar 29, 2013
1 parent c1789bd commit 5a565c0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,12 @@ return getUsername()
});
```

The ``all`` function returns a promise for an array of values. If one
of the given promise fails, the whole returned promise fails, not
waiting for the rest of the batch. If you want to wait for all of the
promises to either be fulfilled or rejected, you can use
``allResolved``.
The ``all`` function returns a promise for an array of values. When this
promise is fulfilled, the array contains the fulfillment values of the original
promises, in the same order as those promises. If one of the given promises
is rejected, the returned promise is immediately rejected, not waiting for the
rest of the batch. If you want to wait for all of the promises to either be
fulfilled or rejected, you can use ``allResolved``.

```javascript
Q.allResolved(promises)
Expand Down

0 comments on commit 5a565c0

Please sign in to comment.