vapor / async-kit

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

Add flatten extensions on `EventLoop` #15

Closed Mordil closed 5 years ago

Mordil commented 5 years ago

Brings an implementation of flatten from Vapor/Core

Example usage:

let elg = MultiThreadedEventLoopGroup(threadCount: 1)
let future = elg.next().flatten(...).wait()
Mordil commented 5 years ago

@calebkleveter This PR can be closed - I thought I had closed it awhile back. These methods are now available from SwiftNIO itself as whenAllSucceed and whenAllComplete

calebkleveter commented 5 years ago

@Mordil Ha! Thanks for saving me the trouble 😄.

Mordil commented 5 years ago

I mean, we probably can keep these extensions on Collection and EventLoop - but perhaps we want to just change the implementation.

tanner0101 commented 5 years ago

I think we should keep the extensions, they are pretty useful. At the very least, we should offer them as deprecated methods given how commonly used they are.

calebkleveter commented 5 years ago

@tanner0101 Sounds good! @MrLotU Mind reviewing this again?

penny-coin commented 5 years ago

Hey @Mordil, you just merged a pull request, have a coin!

You now have 46 coins.