Skip to content

Commit d6d3e95

Browse files
committed
[Concurrency] add currentPriority to task
1 parent 0ccc5e5 commit d6d3e95

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ extension Task {
4444
// ==== Task Priority ----------------------------------------------------------
4545

4646
extension Task {
47+
48+
/// Returns the current task's priority.
49+
public static func currentPriority() async -> Priority {
50+
fatalError("\(#function) not implemented yet.")
51+
}
52+
4753
/// Task priority may inform decisions an `Executor` makes about how and when
4854
/// to schedule tasks submitted to it.
4955
///
@@ -61,7 +67,7 @@ extension Task {
6167
/// as they are "detached" from their parent tasks after all.
6268
///
6369
/// ### Priority elevation
64-
/// In some situations the priority of a task must be elevated ("raised"):
70+
/// In some situations the priority of a task must be elevated (or "escalated", "raised"):
6571
///
6672
/// - if a `Task` running on behalf of an actor, and a new higher-priority
6773
/// task is enqueued to the actor, its current task must be temporarily

0 commit comments

Comments
 (0)