Clarify QPromise::all fulfillment values order

This commit is contained in:
Simon Brunel 2018-04-30 19:02:13 +02:00
parent dcbb2ef860
commit d128a5fa8d
2 changed files with 3 additions and 5 deletions

View File

@ -30,7 +30,3 @@ script:
after_success: after_success:
- bash <(curl -s https://codecov.io/bash) -f coverage.info - bash <(curl -s https://codecov.io/bash) -f coverage.info
# gitbook install .
# gitbook build . dist/docs

View File

@ -4,7 +4,9 @@
[static] QPromise<T>::all(Sequence<QPromise<T>> promises) -> QPromise<QVector<T>> [static] QPromise<T>::all(Sequence<QPromise<T>> promises) -> QPromise<QVector<T>>
``` ```
Returns a `QPromise<QVector<T>>` that fulfills when **all** `promises` of (the same) type `T` have been fulfilled. The `output` value is a vector containing **all** the values of `promises`, in the same order. If any of the given `promises` fail, `output` immediately rejects with the error of the promise that rejected, whether or not the other promises are resolved. Returns a `QPromise<QVector<T>>` that fulfills when **all** `promises` of (the same) type `T` have been fulfilled. The `output` value is a vector containing all the values of `promises`, in the same order, i.e., at the respective positions to the original sequence, regardless of completion order.
If any of the given `promises` fail, `output` immediately rejects with the error of the promise that rejected, whether or not the other promises are resolved.
`Sequence` is any STL compatible container (eg. `QVector`, `QList`, `std::vector`, etc.) `Sequence` is any STL compatible container (eg. `QVector`, `QList`, `std::vector`, etc.)