Contents

dispatch_get_global_queue

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

Declaration

extern dispatch_queue_global_t dispatch_get_global_queue(intptr_t identifier, uintptr_t flags);

Parameters

  • identifier:

    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:

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

Return Value

The requested global concurrent queue.

Discussion

This function returns a queue suitable for executing tasks with the specified quality-of-service level. Calls to the suspend(), 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