<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchWorkItemFlags",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:8Dispatch0A13WorkItemFlagsV"
  },
  "title" : "DispatchWorkItemFlags"
}
-->

# DispatchWorkItemFlags

A set of behaviors for a work item, such as its quality-of-service class and whether to create a barrier or spawn a new detached thread.

```
struct DispatchWorkItemFlags
```

## Topics

### Work Item Flags

[`assignCurrentContext`](/documentation/Dispatch/DispatchWorkItemFlags/assignCurrentContext)

Set the attributes of the work item to match the attributes of the current execution context.

[`barrier`](/documentation/Dispatch/DispatchWorkItemFlags/barrier)

Cause the work item to act as a barrier block when submitted to a concurrent queue.

[`detached`](/documentation/Dispatch/DispatchWorkItemFlags/detached)

Disassociate the work item’s attributes from the current execution context.

[`enforceQoS`](/documentation/Dispatch/DispatchWorkItemFlags/enforceQoS)

Prefer the quality-of-service class associated with the block.

[`inheritQoS`](/documentation/Dispatch/DispatchWorkItemFlags/inheritQoS)

Prefer the quality-of-service class associated with the current execution context.

[`noQoS`](/documentation/Dispatch/DispatchWorkItemFlags/noQoS)

Execute the work item without assigning a quality-of-service class.

### Initializing the Type

### Expressing the Type

### Managing the Type

### Comparing Types

## Relationships

### Conforms To

[`SetAlgebra`](/documentation/Swift/SetAlgebra)

[`OptionSet`](/documentation/Swift/OptionSet)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`ExpressibleByArrayLiteral`](/documentation/Swift/ExpressibleByArrayLiteral)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

---

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)