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

# dispatch_queue_create

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

```
extern dispatch_queue_tdispatch_queue_create(const char *label, dispatch_queue_attr_t attr);
```

## 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`

In macOS 10.7 and later or iOS 4.3 and later, 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. In earlier versions, you must specify `NULL` for this parameter.

## Return Value

The newly created dispatch queue.

## Discussion

Blocks submitted to a serial queue are executed one at a time in FIFO order. Note, however, that blocks submitted to independent queues may be executed concurrently with respect to each other. Blocks submitted to a concurrent queue are dequeued in FIFO order but may run concurrently if resources are available to do so.

If your app isn’t using ARC, you should call [`dispatch_release`](/documentation/Dispatch/dispatch_release) on a dispatch queue when it’s no longer needed. Any pending blocks submitted to a queue hold a reference to that queue, so the queue is not deallocated until all pending blocks have completed.

---

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)