File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import Swift
35
35
/// before returning from this function:
36
36
///
37
37
/// ```
38
- /// await withDiscardingTaskGroup { group in
38
+ /// await withDiscardingTaskGroup(...) { group in
39
39
/// group.addTask { /* slow-task */ }
40
40
/// // slow-task executes...
41
41
/// }
@@ -357,7 +357,7 @@ extension DiscardingTaskGroup: Sendable { }
357
357
/// before returning from this function:
358
358
///
359
359
/// ```
360
- /// try await withThrowingDiscardingTaskGroup { group in
360
+ /// try await withThrowingDiscardingTaskGroup(of: Void.self) { group in
361
361
/// group.addTask { /* slow-task */ }
362
362
/// // slow-task executes...
363
363
/// }
@@ -390,7 +390,7 @@ extension DiscardingTaskGroup: Sendable { }
390
390
///
391
391
/// ```
392
392
/// // ThrowingTaskGroup, pattern not applicable to ThrowingDiscardingTaskGroup
393
- /// try await withThrowingTaskGroup { group in
393
+ /// try await withThrowingTaskGroup(of: Void.self) { group in
394
394
/// group.addTask { try boom() }
395
395
/// try await group.next() // re-throws "boom"
396
396
/// }
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ using FutureFragment = AsyncTask::FutureFragment;
89
89
90
90
// / During evolution discussions we opted to implement the following semantic of
91
91
// / a discarding task-group throw:
92
- // / - the error thrown out of withThrowingDiscardingTaskGroup { ... } always "wins",
92
+ // / - the error thrown out of withThrowingDiscardingTaskGroup(...) { ... } always "wins",
93
93
// / even if the group already had an error stored within.
94
94
// /
95
95
// / This is harder to implement, since we have to always store the "first error from children",
You can’t perform that action at this time.
0 commit comments