---
title: assignCurrentContext
framework: dispatch
role: symbol
role_heading: Type Property
path: dispatch/dispatchworkitemflags/assigncurrentcontext
---

# assignCurrentContext

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

## Declaration

```swift
static let assignCurrentContext: DispatchWorkItemFlags
```

## Discussion

Discussion When this flag is set, the work item inherits attributes such as the quality-of-service class from the dispatch queue or thread responsible for executing the task.

## See Also

### Work Item Flags

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