You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// priority was escalated just before we managed to store the task in the mutex
103
103
state = .priority(newPriority)
104
104
case .task(let task):
105
-
Task.escalatePriority(task, to: newPriority)
105
+
Task.escalatePriority(of: task, to: newPriority)
106
106
}
107
107
}
108
108
}
@@ -172,7 +172,7 @@ The API can also be freely composed with `withTaskCancellationHandler` or there
172
172
173
173
While generally developers should not rely on manual task escalation handling, this API also does introduce a manual way to escalate a task's priority. Primarily this should be used in combination with a task escalation handler to _propagate_ an escalation to an _unstructured task_ which otherwise would miss reacting to the escalation.
174
174
175
-
The `escalatePriority` API is offered as a static method on `Task` in order to slightly hide it away from using it accidentally by stumbling upon it if it were directly declared as a member method of a Task.
175
+
The `escalatePriority(of:to:)` API is offered as a static method on `Task` in order to slightly hide it away from using it accidentally by stumbling upon it if it were directly declared as a member method of a Task.
176
176
177
177
```swift
178
178
extensionTask {
@@ -224,7 +224,7 @@ await withCheckedContinuation2 { cc in
224
224
cc.resume(throwing: CancellationError())
225
225
} onPriorityEscalated: { cc, newPriority in
226
226
print("new priority: \(newPriority)")
227
-
C.withLock { Task.escalatePriority($0.task, to: newPriority) }
227
+
C.withLock { Task.escalatePriority(of: $0.task, to: newPriority) }
228
228
}
229
229
```
230
230
@@ -234,4 +234,4 @@ Overall, this seems like a tightly knit API that changes current idioms of `with
234
234
235
235
### Acknowledgements
236
236
237
-
We'd like to thank John McCall, David Nadoba for their input on the APIs during early reviews.
237
+
I'd like to thank John McCall, David Nadoba for their input on the APIs during early reviews.
0 commit comments