Skip to content

Commit 6492386

Browse files
committed
Match throwing and nonthrowing next() docs.
1 parent 946c72c commit 6492386

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Concurrency/TaskGroup.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,12 +552,12 @@ public struct ThrowingTaskGroup<ChildTaskResult, Failure: Error> {
552552
/// group.addTask { 1 }
553553
/// group.addTask { 2 }
554554
///
555-
/// await print(group.next())
555+
/// print(await group.next())
556556
/// // Prints either "2" or "1".
557557
///
558558
/// If there aren't any pending tasks in the task group,
559559
/// this method returns `nil`,
560-
/// which lets you write like the following
560+
/// which lets you write the following
561561
/// to wait for a single task to complete:
562562
///
563563
/// if let first = try await group.next() {

0 commit comments

Comments
 (0)