From 2df0f761a6d0c9697590f084ee77d042db40b812 Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Fri, 29 Mar 2024 10:40:05 +0900 Subject: [PATCH] queue.async/asyncAfter closures are @Sendable --- src/swift/Queue.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/swift/Queue.swift b/src/swift/Queue.swift index 1e0aea3c8..4b719f9bf 100644 --- a/src/swift/Queue.swift +++ b/src/swift/Queue.swift @@ -253,7 +253,7 @@ extension DispatchQueue { group: DispatchGroup? = nil, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], - execute work: @escaping @convention(block) () -> Void) + execute work: @escaping @Sendable @convention(block) () -> Void) { if group == nil && qos == .unspecified { // Fast-path route for the most common API usage @@ -387,7 +387,7 @@ extension DispatchQueue { deadline: DispatchTime, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], - execute work: @escaping @convention(block) () -> Void) + execute work: @escaping @Sendable @convention(block) () -> Void) { if #available(macOS 10.10, iOS 8.0, *), qos != .unspecified || !flags.isEmpty { let item = DispatchWorkItem(qos: qos, flags: flags, block: work) @@ -418,7 +418,7 @@ extension DispatchQueue { wallDeadline: DispatchWallTime, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], - execute work: @escaping @convention(block) () -> Void) + execute work: @escaping @Sendable @convention(block) () -> Void) { if #available(macOS 10.10, iOS 8.0, *), qos != .unspecified || !flags.isEmpty { let item = DispatchWorkItem(qos: qos, flags: flags, block: work)