@@ -269,7 +269,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
269269 @_allowFeatureSuppression ( IsolatedAny)
270270 public mutating func addTask(
271271 priority: TaskPriority ? = nil ,
272- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
272+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
273273 ) {
274274#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
275275#if SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
@@ -316,7 +316,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
316316 @_allowFeatureSuppression ( IsolatedAny)
317317 public mutating func addTaskUnlessCancelled(
318318 priority: TaskPriority ? = nil ,
319- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
319+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
320320 ) -> Bool {
321321#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
322322 let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
@@ -362,7 +362,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
362362 @_alwaysEmitIntoClient
363363 public mutating func addTask(
364364 priority: TaskPriority ? = nil ,
365- operation: __owned @ Sendable @escaping ( ) async -> ChildTaskResult
365+ operation: sending @escaping ( ) async -> ChildTaskResult
366366 ) {
367367#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
368368#if SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
@@ -390,7 +390,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
390390 @_alwaysEmitIntoClient
391391 public mutating func addTaskUnlessCancelled(
392392 priority: TaskPriority ? = nil ,
393- operation: __owned @ Sendable @escaping ( ) async -> ChildTaskResult
393+ operation: sending @escaping ( ) async -> ChildTaskResult
394394 ) -> Bool {
395395#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
396396 let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
@@ -428,7 +428,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
428428 @_allowFeatureSuppression ( IsolatedAny)
429429 public mutating func addTask(
430430 priority: TaskPriority ? = nil ,
431- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
431+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
432432 ) {
433433 fatalError ( " Unavailable in task-to-thread concurrency model " )
434434 }
@@ -440,7 +440,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
440440 @_alwaysEmitIntoClient
441441 @_allowFeatureSuppression ( IsolatedAny)
442442 public mutating func addTask(
443- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
443+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
444444 ) {
445445#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
446446 let flags = taskCreateFlags (
@@ -469,7 +469,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
469469 @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTaskUnlessCancelled(operation:) " )
470470 public mutating func addTaskUnlessCancelled(
471471 priority: TaskPriority ? = nil ,
472- operation: __owned @ Sendable @escaping ( ) async -> ChildTaskResult
472+ operation: sending @escaping ( ) async -> ChildTaskResult
473473 ) -> Bool {
474474 fatalError ( " Unavailable in task-to-thread concurrency model " )
475475 }
@@ -483,7 +483,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
483483 @_alwaysEmitIntoClient
484484 @_allowFeatureSuppression ( IsolatedAny)
485485 public mutating func addTaskUnlessCancelled(
486- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
486+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
487487 ) -> Bool {
488488#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
489489 let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
@@ -814,7 +814,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
814814 @_allowFeatureSuppression ( IsolatedAny)
815815 public mutating func addTask(
816816 priority: TaskPriority ? = nil ,
817- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async throws -> ChildTaskResult
817+ operation: sending @escaping @isolated ( any) ( ) async throws -> ChildTaskResult
818818 ) {
819819#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
820820 let flags = taskCreateFlags (
@@ -856,7 +856,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
856856 @_allowFeatureSuppression ( IsolatedAny)
857857 public mutating func addTaskUnlessCancelled(
858858 priority: TaskPriority ? = nil ,
859- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async throws -> ChildTaskResult
859+ operation: sending @escaping @isolated ( any) ( ) async throws -> ChildTaskResult
860860 ) -> Bool {
861861#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
862862 let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
@@ -894,7 +894,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
894894 @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTask(operation:) " )
895895 public mutating func addTask(
896896 priority: TaskPriority ? = nil ,
897- operation: __owned @ Sendable @escaping ( ) async throws -> ChildTaskResult
897+ operation: sending @escaping ( ) async throws -> ChildTaskResult
898898 ) {
899899 fatalError ( " Unavailable in task-to-thread concurrency model " )
900900 }
@@ -908,7 +908,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
908908 /// - operation: The operation to execute as part of the task group.
909909 @_alwaysEmitIntoClient
910910 public mutating func addTask(
911- operation: __owned @ Sendable @escaping ( ) async throws -> ChildTaskResult
911+ operation: sending @escaping ( ) async throws -> ChildTaskResult
912912 ) {
913913#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
914914 let flags = taskCreateFlags (
@@ -928,7 +928,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
928928 @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTaskUnlessCancelled(operation:) " )
929929 public mutating func addTaskUnlessCancelled(
930930 priority: TaskPriority ? = nil ,
931- operation: __owned @ Sendable @escaping ( ) async throws -> ChildTaskResult
931+ operation: sending @escaping ( ) async throws -> ChildTaskResult
932932 ) -> Bool {
933933 fatalError ( " Unavailable in task-to-thread concurrency model " )
934934 }
@@ -944,7 +944,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
944944 /// otherwise `false`.
945945 @_alwaysEmitIntoClient
946946 public mutating func addTaskUnlessCancelled(
947- operation: __owned @ Sendable @escaping ( ) async throws -> ChildTaskResult
947+ operation: sending @escaping ( ) async throws -> ChildTaskResult
948948 ) -> Bool {
949949#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
950950 let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
0 commit comments