Type Method

threadPriority()

Returns the current thread’s priority.

Declaration

class func threadPriority() -> Double

Return Value

The current thread’s priority, which is specified by a floating point number from 0.0 to 1.0, where 1.0 is highest priority.

Discussion

The priorities in this range are mapped to the operating system's priority values. A “typical” thread priority might be 0.5, but because the priority is determined by the kernel, there is no guarantee what this value actually will be.

See Also

Prioritizing Thread Work

enum QualityOfService

Used to indicate the nature and importance of work to the system. Work with higher quality of service classes receive more resources than work with lower quality of service classes whenever there is resource contention.

var threadPriority: Double

The receiver’s priority

class func setThreadPriority(Double) -> Bool

Sets the current thread’s priority.