Skip to content

Commit 8ca0e30

Browse files
committed
Remove duplicate doc comment & clean up.
Fixes rdar://79412011
1 parent 0708dee commit 8ca0e30

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
@@ -84,31 +84,17 @@ extension Task {
8484
/// If the awaited on task gets cancelled externally the `get()` will throw
8585
/// a cancellation error.
8686
///
87-
/// If the task gets cancelled internally, e.g. by checking for cancellation
88-
/// and throwing a specific error or using `checkCancellation` the error
89-
/// thrown out of the task will be re-thrown here.
87+
/// If the task gets cancelled internally --
88+
/// for example, by checking for cancellation
89+
/// and throwing a specific error, or by calling `checkCancellation()`,
90+
/// then the error thrown by the task is rethrown here.
9091
public var value: Success {
9192
get async throws {
9293
return try await _taskFutureGetThrowing(_task)
9394
}
9495
}
9596

96-
/// Wait for the task to complete, returning (or throwing) its result.
97-
///
98-
/// ### Priority
99-
/// If the task has not completed yet, its priority will be elevated to the
100-
/// priority of the current task. Note that this may not be as effective as
101-
/// creating the task with the "right" priority to in the first place.
102-
///
103-
/// ### Cancellation
104-
/// If the awaited on task gets cancelled externally the `get()` will throw
105-
/// a cancellation error.
106-
///
107-
/// If the task gets cancelled internally, e.g. by checking for cancellation
108-
/// and throwing a specific error or using `checkCancellation` the error
109-
/// thrown out of the task will be re-thrown here.
110-
111-
/// Wait for the task to complete, returning its `Result`.
97+
/// Wait for the task to complete, returning its result.
11298
///
11399
/// ### Priority
114100
/// If the task has not completed yet, its priority will be elevated to the
@@ -119,9 +105,10 @@ extension Task {
119105
/// If the awaited on task gets cancelled externally the `get()` will throw
120106
/// a cancellation error.
121107
///
122-
/// If the task gets cancelled internally, e.g. by checking for cancellation
123-
/// and throwing a specific error or using `checkCancellation` the error
124-
/// thrown out of the task will be re-thrown here.
108+
/// If the task gets cancelled internally --
109+
/// for example, by checking for cancellation
110+
/// and throwing a specific error, or by calling `checkCancellation()`,
111+
/// then the error thrown by the task is returned here.
125112
public var result: Result<Success, Failure> {
126113
get async {
127114
do {

0 commit comments

Comments
 (0)