Creates a new dispatch work item from an existing block and assigns it the specified quality-of-service class.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
An initialized dispatch work item.
Submit the returned dispatch work item to a queue to schedule it for execution in that queue. Dispatch queues may alter the specified quality-of-service level based on the specified
flags and the quality-of-service level of the queue's underlying threads. However, the queue never executes the block with a quality-of-service level lower than the one in the
You can also execute the dispatch work item directly in the current context by calling its
perform() method. When performing a work item directly, the system never executes the block with a quality-of-service level lower than the one in the