EventLoop.submit(...) should use newPromise() for its promise creation to make it easer to implement

This commit is contained in:
Norman Maurer committed 2017-07-04 20:10:45 +02:00
1 parent c09178ceb2
commit 4b1bc0afa9
1 file changed
+1 -1
+1 -1
View File
@@ -26,7 +26,7 @@ public protocol EventLoop: EventLoopGroup {
extension EventLoop {
public func submit<T>(task: @escaping () throws-> (T)) -> Future<T> {
let promise = Promise<T>(eventLoop: self, checkForPossibleDeadlock: true)
let promise: Promise<T> = newPromise()
execute(task: {() -> () in
do {