---
title: Dequeue
framework: kernel
role: symbol
role_heading: Instance Method
path: kernel/iodataqueuedispatchsource/3438178-dequeue
---

# Dequeue

Removes the next entry from the queue.

## Declaration

```occ
kern_return_t Dequeue(IODataQueueClientDequeueEntryBlock callback);
```

## Parameters

- `callback`: The callback you use to process the next entry in the queue.

## Return Value

Return Value kIOReturnSuccess on success, kIOReturnUnderrun if the queue is empty, or kIOReturnError if the queue is corrupt. See Error Codes.

## See Also

### Removing Work from the Queue

- [SetDataAvailableHandler](driverkit/iodataqueuedispatchsource/setdataavailablehandler.md)
- [DataAvailable](driverkit/iodataqueuedispatchsource/dataavailable.md)
- [IODataQueueClientDequeueEntryBlock](driverkit/iodataqueueclientdequeueentryblock.md)
- [IsDataAvailable](kernel/iodataqueuedispatchsource/3438182-isdataavailable.md)
- [Peek](kernel/iodataqueuedispatchsource/3438183-peek.md)
- [DequeueWithCoalesce](kernel/iodataqueuedispatchsource/3438179-dequeuewithcoalesce.md)
- [SendDataServiced](kernel/iodataqueuedispatchsource/3438185-senddataserviced.md)
