Type PropertyConcurrency

currentPriority

The current task’s priority.

  • Available when Success is Never and Failure is Never

  • iOS 13.0+
  • macOS 10.15+
  • tvOS 13.0+
  • watchOS 6.0+
static var currentPriority: TaskPriority { get }

Overview

If you access this property outside of any task, this queries the system to determine the priority at which the current function is running. If the system can’t provide a priority, this property’s value is Priority.default.