<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchQoS/QoSClass-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:8Dispatch0A3QoSV0B6SClassO"
  },
  "title" : "DispatchQoS.QoSClass"
}
-->

# DispatchQoS.QoSClass

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

```
enum 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 that contain user-interactive tasks 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

### Getting the Quality-of-Service Class

[`DispatchQoS.QoSClass.userInteractive`](/documentation/Dispatch/DispatchQoS/QoSClass-swift.enum/userInteractive)

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

[`DispatchQoS.QoSClass.userInitiated`](/documentation/Dispatch/DispatchQoS/QoSClass-swift.enum/userInitiated)

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

[`DispatchQoS.QoSClass.default`](/documentation/Dispatch/DispatchQoS/QoSClass-swift.enum/default)

The default quality-of-service class.

[`DispatchQoS.QoSClass.utility`](/documentation/Dispatch/DispatchQoS/QoSClass-swift.enum/utility)

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

[`DispatchQoS.QoSClass.background`](/documentation/Dispatch/DispatchQoS/QoSClass-swift.enum/background)

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

[`DispatchQoS.QoSClass.unspecified`](/documentation/Dispatch/DispatchQoS/QoSClass-swift.enum/unspecified)

The absence of a quality-of-service class.

### Initializing the Type

[`init(rawValue:)`](/documentation/Dispatch/DispatchQoS/QoSClass-swift.enum/init(rawValue:))

Initializes the type with a raw value.

[`rawValue`](/documentation/Dispatch/DispatchQoS/QoSClass-swift.enum/rawValue)

The value of the raw type.

### Hashing Values

### Comparing Types



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)