---
title: dispatch_queue_create_with_target
framework: dispatch
role: symbol
role_heading: Function
path: dispatch/dispatch_queue_create_with_target
---

# dispatch_queue_create_with_target

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

## Declaration

```occ
extern dispatch_queue_tdispatch_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 doc://com.apple.dispatch/documentation/Dispatch/DISPATCH_QUEUE_SERIAL (or NULL) to create a serial queue or specify doc://com.apple.dispatch/documentation/Dispatch/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

Return Value The newly created dispatch queue.

## See Also

### Creating a Dispatch Queue

- [dispatch_get_main_queue](dispatch/dispatch_get_main_queue.md)
- [dispatch_get_global_queue](dispatch/dispatch_get_global_queue.md)
- [dispatch_queue_create](dispatch/dispatch_queue_create.md)
- [DISPATCH_QUEUE_SERIAL](dispatch/dispatch_queue_serial.md)
- [DISPATCH_QUEUE_CONCURRENT](dispatch/dispatch_queue_concurrent.md)
- [dispatch_queue_t](dispatch/dispatch_queue_t.md)
- [dispatch_queue_main_t](dispatch/dispatch_queue_main_t.md)
- [dispatch_queue_global_t](dispatch/dispatch_queue_global_t.md)
- [dispatch_queue_serial_t](dispatch/dispatch_queue_serial_t.md)
- [dispatch_queue_concurrent_t](dispatch/dispatch_queue_concurrent_t.md)
