@@ -93,7 +93,7 @@ public final class AsyncQueue<TaskMetadata: DependencyTracker>: Sendable {
9393 public func async < Success: Sendable > (
9494 priority: TaskPriority ? = nil ,
9595 metadata: TaskMetadata ,
96- @_inheritActorContext operation: @escaping @Sendable ( ) async -> Success
96+ @_inheritActorContext operation: nonisolated ( nonsending ) @escaping @Sendable ( ) async -> Success
9797 ) -> Task < Success , Never > {
9898 let throwingTask = asyncThrowing ( priority: priority, metadata: metadata, operation: operation)
9999 return Task ( priority: priority) {
@@ -114,7 +114,7 @@ public final class AsyncQueue<TaskMetadata: DependencyTracker>: Sendable {
114114 public func asyncThrowing< Success: Sendable > (
115115 priority: TaskPriority ? = nil ,
116116 metadata: TaskMetadata ,
117- @_inheritActorContext operation: @escaping @Sendable ( ) async throws -> Success
117+ @_inheritActorContext operation: nonisolated ( nonsending ) @escaping @Sendable ( ) async throws -> Success
118118 ) -> Task < Success , any Error > {
119119 let id = UUID ( )
120120
@@ -178,7 +178,7 @@ extension AsyncQueue where TaskMetadata == Serial {
178178 @discardableResult
179179 public func async < Success: Sendable > (
180180 priority: TaskPriority ? = nil ,
181- @_inheritActorContext operation: @escaping @Sendable ( ) async -> Success
181+ @_inheritActorContext operation: nonisolated ( nonsending ) @escaping @Sendable ( ) async -> Success
182182 ) -> Task < Success , Never > {
183183 return self . async ( priority: priority, metadata: Serial ( ) , operation: operation)
184184 }
@@ -187,7 +187,7 @@ extension AsyncQueue where TaskMetadata == Serial {
187187 /// for serial queues that don't specify any metadata.
188188 public func asyncThrowing< Success: Sendable > (
189189 priority: TaskPriority ? = nil ,
190- @_inheritActorContext operation: @escaping @Sendable ( ) async throws -> Success
190+ @_inheritActorContext operation: nonisolated ( nonsending ) @escaping @Sendable ( ) async throws -> Success
191191 ) -> Task < Success , any Error > {
192192 return self . asyncThrowing ( priority: priority, metadata: Serial ( ) , operation: operation)
193193 }
0 commit comments