Skip to content

Commit 1d63a5d

Browse files
committed
Remove duplicate doc comment & clean up.
Fixes rdar://79412011 (cherry picked from commit 8ca0e30)
1 parent 16a7cc3 commit 1d63a5d

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -60,31 +60,17 @@ extension Task {
6060
/// If the awaited on task gets cancelled externally the `get()` will throw
6161
/// a cancellation error.
6262
///
63-
/// If the task gets cancelled internally, e.g. by checking for cancellation
64-
/// and throwing a specific error or using `checkCancellation` the error
65-
/// thrown out of the task will be re-thrown here.
63+
/// If the task gets cancelled internally --
64+
/// for example, by checking for cancellation
65+
/// and throwing a specific error, or by calling `checkCancellation()`,
66+
/// then the error thrown by the task is rethrown here.
6667
public var value: Success {
6768
get async throws {
6869
return try await _taskFutureGetThrowing(_task)
6970
}
7071
}
7172

72-
/// Wait for the task to complete, returning (or throwing) its result.
73-
///
74-
/// ### Priority
75-
/// If the task has not completed yet, its priority will be elevated to the
76-
/// priority of the current task. Note that this may not be as effective as
77-
/// creating the task with the "right" priority to in the first place.
78-
///
79-
/// ### Cancellation
80-
/// If the awaited on task gets cancelled externally the `get()` will throw
81-
/// a cancellation error.
82-
///
83-
/// If the task gets cancelled internally, e.g. by checking for cancellation
84-
/// and throwing a specific error or using `checkCancellation` the error
85-
/// thrown out of the task will be re-thrown here.
86-
87-
/// Wait for the task to complete, returning its `Result`.
73+
/// Wait for the task to complete, returning its result.
8874
///
8975
/// ### Priority
9076
/// If the task has not completed yet, its priority will be elevated to the
@@ -95,9 +81,10 @@ extension Task {
9581
/// If the awaited on task gets cancelled externally the `get()` will throw
9682
/// a cancellation error.
9783
///
98-
/// If the task gets cancelled internally, e.g. by checking for cancellation
99-
/// and throwing a specific error or using `checkCancellation` the error
100-
/// thrown out of the task will be re-thrown here.
84+
/// If the task gets cancelled internally --
85+
/// for example, by checking for cancellation
86+
/// and throwing a specific error, or by calling `checkCancellation()`,
87+
/// then the error thrown by the task is returned here.
10188
public var result: Result<Success, Failure> {
10289
get async {
10390
do {

0 commit comments

Comments
 (0)