Closed monolithed closed 7 years ago
It's not completely clear what the issues is but let me clarify a bit what we are seeing here.
The all
and sync
methods return a array containing either the result of a task or the thrown error. If you would like the filter out the errors from the results please use the raw
method which returns a Result
object containing the indexes of the resolved/rejected tasks. (it should be easy to map these arrays with the result array to only get your rejects / resolved tasks).
Now about the failFast
not seeming to work is because the initial queue gets run with 10 promises. Since it's kinda impossible to abort promises which already started, the failFast
only kicks in on the 11th promise.
Please let me know if I missed something in your question!
Got it, thanks!
The first attempt
The second attempt
My temporary solution is:
The problems:
{ amountRejected, taskResults, ... }
(due toprogressCallback: Function
) are not defined in d.tsfailFast
seems not to be worked as welltaskResults[x]
may be empty: