From 94f41c4121a82fae5c7b1cb03e630e9f9e5e20f1 Mon Sep 17 00:00:00 2001 From: Fabian Fett Date: Thu, 19 Aug 2021 12:03:46 +0200 Subject: [PATCH] [Concurrency] `completeWithTask` expects to receive a `@Sendable` closure (#1943) --- Sources/_NIOConcurrency/AsyncAwaitSupport.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/_NIOConcurrency/AsyncAwaitSupport.swift b/Sources/_NIOConcurrency/AsyncAwaitSupport.swift index 6901905fed..62b4d23671 100644 --- a/Sources/_NIOConcurrency/AsyncAwaitSupport.swift +++ b/Sources/_NIOConcurrency/AsyncAwaitSupport.swift @@ -66,7 +66,7 @@ extension EventLoopPromise { @available(macOS 12, iOS 15, tvOS 15, watchOS 8, *) @discardableResult @inlinable - public func completeWithTask(_ body: @escaping () async throws -> Value) -> Task { + public func completeWithTask(_ body: @escaping @Sendable () async throws -> Value) -> Task { Task { do { let value = try await body()