---
title: OnQueue
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/iodispatchqueue/onqueue
---

# OnQueue

Returns a Boolean value that indicates whether the current thread matches the dispatch queue’s thread.

## Declaration

```occ
bool OnQueue();
```

## Return Value

Return Value true if the current thread is the same thread that the dispatch queue is using to execute its task.

## Discussion

Discussion Use this method to determine if your code is running on the same thread as the current dispatch queue.

## See Also

### Getting Queue Information

- [GetName](driverkit/iodispatchqueue/getname.md)
- [IODispatchQueueName](driverkit/iodispatchqueuename.md)
