vapor / async-kit

Sugary extensions for the SwiftNIO library
MIT License
71 stars 25 forks source link

All futures #14

Closed Mordil closed 5 years ago

Mordil commented 5 years ago

Implementation of #12

Example usage:

let elg = MultiThreadedEventLoopGroup(numberOfThreads: 1)
let results = try elg.next().whenAllComplete(
    someFunctionThatReturnsIntFuture(),
    someFunctionThatReturnsIntFuture()
).wait()

// results = [Result<Int, Error>]
// results.count == 2
MrLotU commented 5 years ago

Other than the things I mentioned above, looks good to me :)

calebkleveter commented 5 years ago

@tanner0101 Do you have any thoughts on this?

Mordil commented 5 years ago

Closing this PR, as the NIO team is open this addition to itself: https://github.com/apple/swift-nio/pull/773