Files
swift-nio/Sources
Nathan Harris 9b9dcebecf add ELF.whenAllSucceed method to act as "fail fast" counter-part to ELF.whenAllComplete (#804)
Motivation:

`ELF.whenAllComplete` is a "fail slow" method that returns an `EventLoopFuture` that always succeeds after all provided futures complete - fulfilling with all the results of the futures.

`ELF.whenAllSucceed` is a "fail fast" method that returns an `EventLoopFuture` that succeeds if all of the futures succeed - and returning the fulfilled values.

This new method acts as a counterpart to both `ELF.whenAllComplete` and `andAll`

Modifications:

Add `ELF.whenAllSucceed` that returns an EventLoopFuture with all of the values provided from the futures being awaited.

Rename `ELF.whenAllComplete(_:eventLoop:)` to `ELF.whenAllComplete(_🔛)` to match new `whenAllSucceed` and Swift API guidelines

Result:

New method for flattening multiple futures into a single EventLoopFuture that fulfills with an array of their success values if they all succeed.
2019-02-04 17:43:01 +00:00
..