---
title: DequeueWithCoalesce
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/iodataqueuedispatchsource/dequeuewithcoalesce
---

# DequeueWithCoalesce

Removes the next queue entry, but doesn’t automatically send notifications.

## Declaration

```occ
kern_return_t DequeueWithCoalesce(bool *sendDataServiced, IODataQueueClientDequeueEntryBlock callback);
```

## Parameters

- `sendDataServiced`: A Boolean value that indicates that this method would have sent a notification. Initialize the value to false, and then make one or more calls to this method. If the value is true after all of those calls, call the doc://com.apple.driverkit/documentation/DriverKit/IODataQueueDispatchSource/SendDataServiced method yourself to deliver the notification.
- `callback`: The callback that you use to process the dequeued data.

## 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)
- [IsDataAvailable](driverkit/iodataqueuedispatchsource/isdataavailable.md)
- [Peek](driverkit/iodataqueuedispatchsource/peek.md)
- [Dequeue](driverkit/iodataqueuedispatchsource/dequeue.md)
- [SendDataServiced](driverkit/iodataqueuedispatchsource/senddataserviced.md)
- [IODataQueueClientDequeueEntryBlock](driverkit/iodataqueueclientdequeueentryblock.md)
