@@ -230,6 +230,14 @@ public struct TaskGroup<ChildTaskResult> {
230
230
spawn ( priority: optPriority, operation: operation)
231
231
}
232
232
233
+ @_alwaysEmitIntoClient
234
+ public mutating func async (
235
+ priority: Task . Priority ? = nil ,
236
+ operation: __owned @Sendable @escaping ( ) async -> ChildTaskResult
237
+ ) {
238
+ spawn ( priority: priority, operation: operation)
239
+ }
240
+
233
241
/// Add a child task to the group.
234
242
///
235
243
/// ### Error handling
@@ -280,6 +288,14 @@ public struct TaskGroup<ChildTaskResult> {
280
288
return spawnUnlessCancelled ( priority: optPriority, operation: operation)
281
289
}
282
290
291
+ @_alwaysEmitIntoClient
292
+ public mutating func asyncUnlessCancelled(
293
+ priority: Task . Priority ? = nil ,
294
+ operation: __owned @Sendable @escaping ( ) async -> ChildTaskResult
295
+ ) -> Bool {
296
+ spawnUnlessCancelled ( priority: priority, operation: operation)
297
+ }
298
+
283
299
/// Add a child task to the group.
284
300
///
285
301
/// ### Error handling
@@ -502,6 +518,14 @@ public struct ThrowingTaskGroup<ChildTaskResult, Failure: Error> {
502
518
return spawn ( priority: optPriority, operation: operation)
503
519
}
504
520
521
+ @_alwaysEmitIntoClient
522
+ public mutating func async (
523
+ priority: Task . Priority ? = nil ,
524
+ operation: __owned @Sendable @escaping ( ) async throws -> ChildTaskResult
525
+ ) {
526
+ spawn ( priority: priority, operation: operation)
527
+ }
528
+
505
529
/// Spawn, unconditionally, a child task in the group.
506
530
///
507
531
/// ### Error handling
@@ -553,6 +577,14 @@ public struct ThrowingTaskGroup<ChildTaskResult, Failure: Error> {
553
577
return spawnUnlessCancelled ( priority: optPriority, operation: operation)
554
578
}
555
579
580
+ @_alwaysEmitIntoClient
581
+ public mutating func asyncUnlessCancelled(
582
+ priority: Task . Priority ? = nil ,
583
+ operation: __owned @Sendable @escaping ( ) async throws -> ChildTaskResult
584
+ ) -> Bool {
585
+ spawnUnlessCancelled ( priority: priority, operation: operation)
586
+ }
587
+
556
588
/// Add a child task to the group.
557
589
///
558
590
/// ### Error handling
0 commit comments