@@ -84,31 +84,17 @@ extension Task {
84
84
/// If the awaited on task gets cancelled externally the `get()` will throw
85
85
/// a cancellation error.
86
86
///
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.
90
91
public var value : Success {
91
92
get async throws {
92
93
return try await _taskFutureGetThrowing ( _task)
93
94
}
94
95
}
95
96
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.
112
98
///
113
99
/// ### Priority
114
100
/// If the task has not completed yet, its priority will be elevated to the
@@ -119,9 +105,10 @@ extension Task {
119
105
/// If the awaited on task gets cancelled externally the `get()` will throw
120
106
/// a cancellation error.
121
107
///
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.
125
112
public var result : Result < Success , Failure > {
126
113
get async {
127
114
do {
0 commit comments