Structure

DispatchQoS

DispatchQoS encapsulates quality of service classes.

Overview

A quality of service (QoS) class categorizes work to be performed on a DispatchQueue. By specifying a QoS to work, you indicate its importance, and the system prioritizes it and schedules it accordingly.

Because higher priority work is performed more quickly and with more resources than lower priority work, it typically requires more energy than lower priority work. Accurately specifying appropriate QoS classes for the work your app performs ensures that your app is responsive and energy efficient.

Topics

Initializers

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

Creates a new DispatchQoS object with the specified QoS class and relative priority.

Instance Properties

let qosClass: DispatchQoS.QoSClass

The quality of service (QoS) class.

let relativePriority: Int

The priority of a Quality of Service relative to others with the same class.

Type Properties

static let background: DispatchQoS

The background quality of service class.

static let `default`: DispatchQoS

The default quality of service class.

static let unspecified: DispatchQoS

The absence of a quality of service class.

static let userInitiated: DispatchQoS

The user-initiated quality of service class.

static let userInteractive: DispatchQoS

The user-interactive quality of service class.

static let utility: DispatchQoS

The utility quality of service class.

Enumerations

enum DispatchQoS.QoSClass

DispatchQoS.QoSClass encapsulates quality of service classes.

Relationships

Conforms To

See Also

Prioritizing Work and Specifying Quality of Service

enum DispatchQoS.QoSClass

DispatchQoS.QoSClass encapsulates quality of service classes.

Dispatch Queue Priorities

Used to select the appropriate global concurrent queue.