<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/dispatch_queue_create_with_target",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "c:@F@dispatch_queue_create_with_target"
  },
  "title" : "dispatch_queue_create_with_target"
}
-->

# dispatch_queue_create_with_target

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

```
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 [`DISPATCH_QUEUE_SERIAL`](/documentation/Dispatch/DISPATCH_QUEUE_SERIAL) (or `NULL`) to create a serial queue or specify [`DISPATCH_QUEUE_CONCURRENT`](/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

The newly created dispatch queue.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)