---
title: enforceQoS
framework: dispatch
role: symbol
role_heading: Type Property
path: dispatch/dispatchworkitemflags/enforceqos
---

# enforceQoS

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

## Declaration

```swift
static let enforceQoS: DispatchWorkItemFlags
```

## Discussion

Discussion This flag prioritizes the block’s quality-of-service class over the one associated with the current execution context, as long as doing so does not lower the quality of service.

## See Also

### Work Item Flags

- [assignCurrentContext](dispatch/dispatchworkitemflags/assigncurrentcontext.md)
- [barrier](dispatch/dispatchworkitemflags/barrier.md)
- [detached](dispatch/dispatchworkitemflags/detached.md)
- [inheritQoS](dispatch/dispatchworkitemflags/inheritqos.md)
- [noQoS](dispatch/dispatchworkitemflags/noqos.md)
