@@ -11,30 +11,30 @@ import NIO
1111public typealias Future = EventLoopFuture
1212
1313extension Collection {
14- public func flatten< T> ( on worker : EventLoopGroup ) -> Future < [ T ] > where Element == Future < T > {
15- return Future . whenAll ( Array ( self ) , eventLoop: worker . next ( ) )
14+ public func flatten< T> ( on eventLoopGroup : EventLoopGroup ) -> Future < [ T ] > where Element == Future < T > {
15+ return Future . whenAll ( Array ( self ) , eventLoop: eventLoopGroup . next ( ) )
1616 }
1717}
1818
1919extension Collection {
2020 public func flatMap< S, T> (
2121 to type: T . Type ,
22- on worker : EventLoopGroup ,
22+ on eventLoopGroup : EventLoopGroup ,
2323 _ callback: @escaping ( [ S ] ) throws -> Future < T >
2424 ) -> Future < T > where Element == Future < S > {
25- return flatten ( on: worker ) . flatMap ( to: T . self, callback)
25+ return flatten ( on: eventLoopGroup ) . flatMap ( to: T . self, callback)
2626 }
2727}
2828
2929extension Dictionary where Value : FutureType {
30- func flatten( on worker : EventLoopGroup ) -> Future < [ Key : Value . Expectation ] > {
30+ func flatten( on eventLoopGroup : EventLoopGroup ) -> Future < [ Key : Value . Expectation ] > {
3131 var elements : [ Key : Value . Expectation ] = [ : ]
3232
3333 guard self . count > 0 else {
34- return worker . next ( ) . newSucceededFuture ( result: elements)
34+ return eventLoopGroup . next ( ) . newSucceededFuture ( result: elements)
3535 }
3636
37- let promise : EventLoopPromise < [ Key : Value . Expectation ] > = worker . next ( ) . newPromise ( )
37+ let promise : EventLoopPromise < [ Key : Value . Expectation ] > = eventLoopGroup . next ( ) . newPromise ( )
3838 elements. reserveCapacity ( self . count)
3939
4040 for (key, value) in self {
0 commit comments