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

# dispatch_get_current_queue()

Returns the queue on which the currently executing block is running.

```
func dispatch_get_current_queue() -> dispatch_queue_t
```

## Return Value

Returns the current queue.

## Discussion

This function is defined to never return `NULL`.

When called from outside of the context of a submitted block, this function returns the main queue if the call is executed from the main thread. If the call is made from any other thread, this function returns the default concurrent 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)