---
title: DequeueWithCoalesce
framework: kernel
role: symbol
role_heading: Instance Method
path: kernel/iodataqueuedispatchsource/3438179-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.documentation/documentation/kernel/iodataqueuedispatchsource/3438185-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)
- [IODataQueueClientDequeueEntryBlock](driverkit/iodataqueueclientdequeueentryblock.md)
- [IsDataAvailable](kernel/iodataqueuedispatchsource/3438182-isdataavailable.md)
- [Peek](kernel/iodataqueuedispatchsource/3438183-peek.md)
- [Dequeue](kernel/iodataqueuedispatchsource/3438178-dequeue.md)
- [SendDataServiced](kernel/iodataqueuedispatchsource/3438185-senddataserviced.md)
