Enumeration

DispatchQoS.QoSClass

Quality-of-service classes that specify the priorities for executing tasks.

Declaration

enum DispatchQoS.QoSClass

Overview

Use quality-of-service classes to communicate the intent behind the work that your app performs. The system uses those intentions to determine the best way to execute your tasks given the available resources. For example, the system gives higher priority to threads containing user-interactive tasks so as to ensure that those tasks are executed quickly. Conversely, it gives lower priority to background tasks, and may attempt to save power by executing them on more power-efficient CPU cores. The system determines how to execute your tasks dynamically based on system conditions and the tasks you schedule.

Topics

Quality-of-Service Classes

case userInteractive

The quality-of-service class for user-interactive tasks, such as animations, event handling, or updating your app's user interface.

case userInitiated

The quality-of-service class for tasks that prevent the user from actively using your app.

case `default`

The default quality-of-service class.

case utility

The quality-of-service class for tasks that the user does not track actively.

case background

The quality-of-service class for maintenance or cleanup tasks that you create.

case unspecified

The absence of a quality-of-service class.

See Also

Creating a QoS Object

init(qosClass: DispatchQoS.QoSClass, relativePriority: Int)

Creates a new DispatchQoS object with the specified QoS class and relative 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