Type Method

setThreadPriority:

Sets the current thread’s priority.

Declaration

+ (BOOL)setThreadPriority:(double)p;

Parameters

priority

The new priority, specified with a floating point number from 0.0 to 1.0, where 1.0 is highest priority.

Return Value

YES if the priority assignment succeeded, NO otherwise.

Discussion

The priorities in this range are mapped to the operating system's priority values.

See Also

Prioritizing Thread Work

NSQualityOfService

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.

+ threadPriority

Returns the current thread’s priority.

threadPriority

The receiver’s priority

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software