@@ -63,7 +63,9 @@ import Swift
6363/// For tasks that need to handle cancellation by throwing an error,
6464/// use the `withThrowingTaskGroup(of:returning:body:)` method instead.
6565@available ( SwiftStdlib 5 . 1 , * )
66+ #if !$Embedded
6667@backDeployed ( before: SwiftStdlib 6.0 )
68+ #endif
6769@inlinable
6870public func withTaskGroup< ChildTaskResult, GroupResult> (
6971 of childTaskResultType: ChildTaskResult . Type = ChildTaskResult . self,
@@ -198,7 +200,9 @@ public func _unsafeInheritExecutor_withTaskGroup<ChildTaskResult, GroupResult>(
198200/// which gives you a chance to handle the individual error
199201/// or to let the group rethrow the error.
200202@available ( SwiftStdlib 5 . 1 , * )
203+ #if !$Embedded
201204@backDeployed ( before: SwiftStdlib 6.0 )
205+ #endif
202206@inlinable
203207public func withThrowingTaskGroup< ChildTaskResult, GroupResult> (
204208 of childTaskResultType: ChildTaskResult . Type = ChildTaskResult . self,
@@ -592,7 +596,9 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
592596 ///
593597 /// - Returns: The value returned by the next child task that completes.
594598 @available ( SwiftStdlib 5 . 1 , * )
599+ #if !$Embedded
595600 @backDeployed ( before: SwiftStdlib 6.0 )
601+ #endif
596602 public mutating func next( isolation: isolated ( any Actor ) ? = #isolation) async -> ChildTaskResult ? {
597603 // try!-safe because this function only exists for Failure == Never,
598604 // and as such, it is impossible to spawn a throwing child task.
@@ -610,7 +616,9 @@ public struct TaskGroup<ChildTaskResult: Sendable> {
610616 /// Await all of the pending tasks added this group.
611617 @usableFromInline
612618 @available ( SwiftStdlib 5 . 1 , * )
619+ #if !$Embedded
613620 @backDeployed ( before: SwiftStdlib 6.0 )
621+ #endif
614622 internal mutating func awaitAllRemainingTasks( isolation: isolated ( any Actor ) ? = #isolation) async {
615623 while let _ = await next ( isolation: isolation) { }
616624 }
@@ -750,7 +758,9 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
750758 /// Await all the remaining tasks on this group.
751759 @usableFromInline
752760 @available ( SwiftStdlib 5 . 1 , * )
761+ #if !$Embedded
753762 @backDeployed ( before: SwiftStdlib 6.0 )
763+ #endif
754764 internal mutating func awaitAllRemainingTasks( isolation: isolated ( any Actor ) ? = #isolation) async {
755765 while true {
756766 do {
@@ -1028,7 +1038,9 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
10281038 ///
10291039 /// - SeeAlso: `nextResult()`
10301040 @available ( SwiftStdlib 5 . 1 , * )
1041+ #if !$Embedded
10311042 @backDeployed ( before: SwiftStdlib 6.0 )
1043+ #endif
10321044 public mutating func next( isolation: isolated ( any Actor ) ? = #isolation) async throws -> ChildTaskResult ? {
10331045 return try await _taskGroupWaitNext ( group: _group)
10341046 }
0 commit comments