@@ -60,31 +60,17 @@ extension Task {
60
60
/// If the awaited on task gets cancelled externally the `get()` will throw
61
61
/// a cancellation error.
62
62
///
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.
66
67
public var value : Success {
67
68
get async throws {
68
69
return try await _taskFutureGetThrowing ( _task)
69
70
}
70
71
}
71
72
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.
88
74
///
89
75
/// ### Priority
90
76
/// If the task has not completed yet, its priority will be elevated to the
@@ -95,9 +81,10 @@ extension Task {
95
81
/// If the awaited on task gets cancelled externally the `get()` will throw
96
82
/// a cancellation error.
97
83
///
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.
101
88
public var result : Result < Success , Failure > {
102
89
get async {
103
90
do {
0 commit comments