@@ -269,7 +269,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
269
269
@_allowFeatureSuppression ( IsolatedAny)
270
270
public mutating func addTask(
271
271
priority: TaskPriority ? = nil ,
272
- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
272
+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
273
273
) {
274
274
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
275
275
#if SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
@@ -316,7 +316,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
316
316
@_allowFeatureSuppression ( IsolatedAny)
317
317
public mutating func addTaskUnlessCancelled(
318
318
priority: TaskPriority ? = nil ,
319
- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
319
+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
320
320
) -> Bool {
321
321
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
322
322
let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
@@ -362,7 +362,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
362
362
@_alwaysEmitIntoClient
363
363
public mutating func addTask(
364
364
priority: TaskPriority ? = nil ,
365
- operation: __owned @ Sendable @escaping ( ) async -> ChildTaskResult
365
+ operation: sending @escaping ( ) async -> ChildTaskResult
366
366
) {
367
367
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
368
368
#if SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
@@ -390,7 +390,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
390
390
@_alwaysEmitIntoClient
391
391
public mutating func addTaskUnlessCancelled(
392
392
priority: TaskPriority ? = nil ,
393
- operation: __owned @ Sendable @escaping ( ) async -> ChildTaskResult
393
+ operation: sending @escaping ( ) async -> ChildTaskResult
394
394
) -> Bool {
395
395
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
396
396
let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
@@ -428,7 +428,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
428
428
@_allowFeatureSuppression ( IsolatedAny)
429
429
public mutating func addTask(
430
430
priority: TaskPriority ? = nil ,
431
- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
431
+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
432
432
) {
433
433
fatalError ( " Unavailable in task-to-thread concurrency model " )
434
434
}
@@ -440,7 +440,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
440
440
@_alwaysEmitIntoClient
441
441
@_allowFeatureSuppression ( IsolatedAny)
442
442
public mutating func addTask(
443
- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
443
+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
444
444
) {
445
445
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
446
446
let flags = taskCreateFlags (
@@ -469,7 +469,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
469
469
@available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTaskUnlessCancelled(operation:) " )
470
470
public mutating func addTaskUnlessCancelled(
471
471
priority: TaskPriority ? = nil ,
472
- operation: __owned @ Sendable @escaping ( ) async -> ChildTaskResult
472
+ operation: sending @escaping ( ) async -> ChildTaskResult
473
473
) -> Bool {
474
474
fatalError ( " Unavailable in task-to-thread concurrency model " )
475
475
}
@@ -483,7 +483,7 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
483
483
@_alwaysEmitIntoClient
484
484
@_allowFeatureSuppression ( IsolatedAny)
485
485
public mutating func addTaskUnlessCancelled(
486
- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async -> ChildTaskResult
486
+ operation: sending @escaping @isolated ( any) ( ) async -> ChildTaskResult
487
487
) -> Bool {
488
488
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
489
489
let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
@@ -814,7 +814,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
814
814
@_allowFeatureSuppression ( IsolatedAny)
815
815
public mutating func addTask(
816
816
priority: TaskPriority ? = nil ,
817
- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async throws -> ChildTaskResult
817
+ operation: sending @escaping @isolated ( any) ( ) async throws -> ChildTaskResult
818
818
) {
819
819
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
820
820
let flags = taskCreateFlags (
@@ -856,7 +856,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
856
856
@_allowFeatureSuppression ( IsolatedAny)
857
857
public mutating func addTaskUnlessCancelled(
858
858
priority: TaskPriority ? = nil ,
859
- operation: __owned @ Sendable @escaping @isolated ( any) ( ) async throws -> ChildTaskResult
859
+ operation: sending @escaping @isolated ( any) ( ) async throws -> ChildTaskResult
860
860
) -> Bool {
861
861
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
862
862
let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
@@ -894,7 +894,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
894
894
@available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTask(operation:) " )
895
895
public mutating func addTask(
896
896
priority: TaskPriority ? = nil ,
897
- operation: __owned @ Sendable @escaping ( ) async throws -> ChildTaskResult
897
+ operation: sending @escaping ( ) async throws -> ChildTaskResult
898
898
) {
899
899
fatalError ( " Unavailable in task-to-thread concurrency model " )
900
900
}
@@ -908,7 +908,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
908
908
/// - operation: The operation to execute as part of the task group.
909
909
@_alwaysEmitIntoClient
910
910
public mutating func addTask(
911
- operation: __owned @ Sendable @escaping ( ) async throws -> ChildTaskResult
911
+ operation: sending @escaping ( ) async throws -> ChildTaskResult
912
912
) {
913
913
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
914
914
let flags = taskCreateFlags (
@@ -928,7 +928,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
928
928
@available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTaskUnlessCancelled(operation:) " )
929
929
public mutating func addTaskUnlessCancelled(
930
930
priority: TaskPriority ? = nil ,
931
- operation: __owned @ Sendable @escaping ( ) async throws -> ChildTaskResult
931
+ operation: sending @escaping ( ) async throws -> ChildTaskResult
932
932
) -> Bool {
933
933
fatalError ( " Unavailable in task-to-thread concurrency model " )
934
934
}
@@ -944,7 +944,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
944
944
/// otherwise `false`.
945
945
@_alwaysEmitIntoClient
946
946
public mutating func addTaskUnlessCancelled(
947
- operation: __owned @ Sendable @escaping ( ) async throws -> ChildTaskResult
947
+ operation: sending @escaping ( ) async throws -> ChildTaskResult
948
948
) -> Bool {
949
949
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
950
950
let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
0 commit comments