Instance Property


The default service level to apply to operations executed using the queue.


var qualityOfService: QualityOfService { get set }


This property specifies the service level applied to operation objects added to the queue. If the operation object has an explicit service level set, that value is used instead. The default value of this property depends on how you created the queue. For queues you create yourself, the default value is NSOperationQualityOfServiceBackground. For the queue returned by the main method, the default value is NSOperationQualityOfServiceUserInteractive and cannot be changed.

Service levels affect the priority with which operation objects are given access to system resources such as CPU time, network resources, disk resources, and so on. Operations with a higher quality of service level are given greater priority over system resources so that they may perform their task more quickly. You use service levels to ensure that operations responding to explicit user requests are given priority over less critical work.

See Also

Managing the Execution of Operations

var maxConcurrentOperationCount: Int

The maximum number of queued operations that can execute at the same time.

class let defaultMaxConcurrentOperationCount: Int

The default maximum number of operations to be executed concurrently in a queue.

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