Contents

escalatePriority(to:)

Escalate the task priority of the passed in task to the newPriority.

Declaration

func escalatePriority(to newPriority: TaskPriority)

Parameters

  • newPriority:

    The new priority the task should continue executing on

Discussion

The concurrency runtime is free to interpret and handle escalation depending on platform characteristics.

Priority escalation is propagated to child tasks of the waited-on task, and will trigger any priority escalation handlers, if any were registered.

Escalation can only increase the priority of a task, and de-escalating priority is not supported.

This method can be called from any task or thread.