From 4b1bc0afa98466ad57abd5bb8b3cb494e02c8a6e Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Tue, 4 Jul 2017 20:10:45 +0200 Subject: [PATCH] EventLoop.submit(...) should use newPromise() for its promise creation to make it easer to implement --- Sources/NIO/EventLoop.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/NIO/EventLoop.swift b/Sources/NIO/EventLoop.swift index 75e1e560b..06d13cf02 100644 --- a/Sources/NIO/EventLoop.swift +++ b/Sources/NIO/EventLoop.swift @@ -26,7 +26,7 @@ public protocol EventLoop: EventLoopGroup { extension EventLoop { public func submit(task: @escaping () throws-> (T)) -> Future { - let promise = Promise(eventLoop: self, checkForPossibleDeadlock: true) + let promise: Promise = newPromise() execute(task: {() -> () in do {