Returns a system-defined global concurrent queue with the specified quality-of-service class.


dispatch_queue_global_t dispatch_get_global_queue(long identifier, unsigned long flags);



The quality of service you want to give to tasks executed using this queue. Quality-of-service helps determine the priority given to tasks executed by the queue. You may specify the values QOS_CLASS_USER_INTERACTIVE, QOS_CLASS_USER_INITIATED, QOS_CLASS_UTILITY, or QOS_CLASS_BACKGROUND. Queues that handle user-interactive or user-initiated tasks have a higher priority than tasks meant to run in the background.

In OS X 10.9 or earlier, you can specify one of the dispatch queue priority values, which are found in dispatch_queue_priority_t. These values map to an appropriate quality-of-service class.


Flags that are reserved for future use. Always specify 0 for this parameter.

Return Value

The requested global concurrent queue.


This function returns a queue suitable for executing tasks with the specified quality-of-service level. Calls to the dispatch_suspend, dispatch_resume, and dispatch_set_context functions have no effect on the returned queues.

Tasks submitted to the returned queue are scheduled concurrently with respect to one another.

See Also

Queues and Tasks


Returns the serial dispatch queue associated with the application’s main thread.

Dispatch Queue

An object that manages the execution of tasks serially or concurrently on your app's main thread or on a background thread.

Dispatch Work Item

The work you want to perform, encapsulated in a way that lets you attach a completion handle or execution dependencies.

Dispatch Group

A group of tasks that you monitor as a single unit.