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

# OnQueue

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

## Declaration

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

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

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