<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IODataQueueDispatchSource/DataAvailable",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IODataQueueDispatchSource@F@DataAvailable#*$@S@OSAction#"
  },
  "title" : "DataAvailable"
}
-->

# DataAvailable

Responds to the addition of new data to the queue.

```
virtual void DataAvailable(OSAction *action);
```

## Parameters

`action`

The action object being executed.

## Discussion

Use this method as a prototype for declaring your own custom data-queue handlers. When declaring your method, use the [`TYPE`](/documentation/DriverKit/TYPE) macro to indicate that your method has the same parameters and return value as this method.

Use the implementation of your method to examine the data in the queue and remove it when appropriate.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)