mirror of
https://github.com/apple/swift-nio
synced 2026-11-27 05:04:22 +00:00
EventLoop.submit(...) should use newPromise() for its promise creation to make it easer to implement
This commit is contained in:
1 parent
c09178ceb2
commit
4b1bc0afa9
1 file changed
+1
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user