Type Alias


A lightweight object to which your application submits blocks for subsequent execution.


typedef NSObject<OS_dispatch_queue> *dispatch_queue_t;


A dispatch queue invokes blocks submitted to it serially in FIFO order. A serial queue invokes only one block at a time, but independent queues may each invoke their blocks concurrently with respect to each other.

The global concurrent queues invoke blocks in FIFO order but do not wait for their completion, allowing multiple blocks to be invoked concurrently.

The system manages a pool of threads that process dispatch queues and invoke blocks submitted to them. Conceptually, a dispatch queue may have its own thread of execution, and interaction between queues is highly asynchronous.

Dispatch queues are reference counted via calls to dispatch_retain and dispatch_release. Pending blocks submitted to a queue also hold a reference to the queue until they have finished. Once all references to a queue have been released, the queue will be deallocated by the system.

See Also

Creating a Dispatch Queue


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


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


Creates a new dispatch queue to which you can submit blocks.


Creates a new dispatch queue to which you can submit blocks.


A dispatch queue that executes blocks serially in FIFO order.


A dispatch queue that executes blocks concurrently.


A dispatch queue that is bound to the app's main thread and executes tasks serially on that thread.


A dispatch queue that executes tasks concurrently using threads from the global thread pool.


A dispatch queue that executes tasks serially in first-in, first-out (FIFO) order.


A dispatch queue that executes tasks concurrently and in any order, respecting any barriers that may be in place.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software