Contents

dispatch_queue_create_with_target

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

Declaration

extern dispatch_queue_t dispatch_queue_create_with_target(const char *label, dispatch_queue_attr_t attr, dispatch_queue_t target);

Parameters

  • label:

    A string label to attach to the queue to uniquely identify it in debugging tools such as Instruments, sample, stackshots, and crash reports. Because applications, libraries, and frameworks can all create their own dispatch queues, a reverse-DNS naming style (com.example.myqueue) is recommended. This parameter is optional and can be NULL.

  • attr:

    The queue attributes. Specify Dispatch_queue_serial (or NULL) to create a serial queue or specify Dispatch_queue_concurrent to create a concurrent queue.

  • target:

    The target queue on which to execute blocks. This method retains the target queue. Specify DISPATCH_TARGET_QUEUE_DEFAULT to set the target queue to the default type for the current dispatch queue.

Return Value

The newly created dispatch queue.

See Also

Creating a Dispatch Queue