---
title: dispatch_get_current_queue()
framework: dispatch
role: symbol
role_heading: Function
path: dispatch/dispatch_get_current_queue()
---

# dispatch_get_current_queue()

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

## Declaration

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

## Return Value

Return Value Returns the current queue.

## Discussion

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.

## See Also

### Functions

- [dispatch_debugv(_:_:_:)](dispatch/dispatch_debugv(_:_:_:).md)
