@@ -171,9 +171,9 @@ public struct DiscardingTaskGroup {
171
171
#if SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
172
172
@available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTask(operation:) " )
173
173
#endif
174
- public mutating func addTask(
174
+ public mutating func addTask< DiscardedResult > (
175
175
priority: TaskPriority ? = nil ,
176
- operation: __owned @Sendable @escaping ( ) async -> Void
176
+ operation: __owned @Sendable @escaping ( ) async -> DiscardedResult
177
177
) {
178
178
#if SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
179
179
let flags = taskCreateFlags (
@@ -206,9 +206,9 @@ public struct DiscardingTaskGroup {
206
206
#if SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
207
207
@available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTask(operation:) " )
208
208
#endif
209
- public mutating func addTaskUnlessCancelled(
209
+ public mutating func addTaskUnlessCancelled< DiscardedResult > (
210
210
priority: TaskPriority ? = nil ,
211
- operation: __owned @Sendable @escaping ( ) async -> Void
211
+ operation: __owned @Sendable @escaping ( ) async -> DiscardedResult
212
212
) -> Bool {
213
213
let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
214
214
@@ -237,8 +237,8 @@ public struct DiscardingTaskGroup {
237
237
}
238
238
239
239
@_alwaysEmitIntoClient
240
- public mutating func addTask(
241
- operation: __owned @Sendable @escaping ( ) async -> Void
240
+ public mutating func addTask< DiscardedResult > (
241
+ operation: __owned @Sendable @escaping ( ) async -> DiscardedResult
242
242
) {
243
243
let flags = taskCreateFlags (
244
244
priority: nil , isChildTask: true , copyTaskLocals: false ,
@@ -260,8 +260,8 @@ public struct DiscardingTaskGroup {
260
260
@available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTaskUnlessCancelled(operation:) " )
261
261
#endif
262
262
@_alwaysEmitIntoClient
263
- public mutating func addTaskUnlessCancelled(
264
- operation: __owned @Sendable @escaping ( ) async -> Void
263
+ public mutating func addTaskUnlessCancelled< DiscardedResult > (
264
+ operation: __owned @Sendable @escaping ( ) async -> DiscardedResult
265
265
) -> Bool {
266
266
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
267
267
let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
@@ -547,9 +547,9 @@ public struct ThrowingDiscardingTaskGroup<Failure: Error> {
547
547
@available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTask(operation:) " )
548
548
#endif
549
549
@_alwaysEmitIntoClient
550
- public mutating func addTask(
550
+ public mutating func addTask< DiscardedResult > (
551
551
priority: TaskPriority ? = nil ,
552
- operation: __owned @Sendable @escaping ( ) async throws -> Void
552
+ operation: __owned @Sendable @escaping ( ) async throws -> DiscardedResult
553
553
) {
554
554
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
555
555
let flags = taskCreateFlags (
@@ -569,9 +569,9 @@ public struct ThrowingDiscardingTaskGroup<Failure: Error> {
569
569
@available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " , renamed: " addTask(operation:) " )
570
570
#endif
571
571
@_alwaysEmitIntoClient
572
- public mutating func addTaskUnlessCancelled(
572
+ public mutating func addTaskUnlessCancelled< DiscardedResult > (
573
573
priority: TaskPriority ? = nil ,
574
- operation: __owned @Sendable @escaping ( ) async throws -> Void
574
+ operation: __owned @Sendable @escaping ( ) async throws -> DiscardedResult
575
575
) -> Bool {
576
576
#if compiler(>=5.5) && $BuiltinCreateAsyncTaskInGroup
577
577
let canAdd = _taskGroupAddPendingTask ( group: _group, unconditionally: false )
0 commit comments