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

# SetDataQueue

Assigns the specified dispatch source to this object.

```
kern_return_t SetDataQueue(IODataQueueDispatchSource *dataQueue);
```

## Parameters

`dataQueue`

The new data queue to use when executing tasks.

## Return Value

`kIOReturnSuccess` on success, or another value if an error occurred.

## Discussion

Use this method to change the dispatch queue that this object uses to perform tasks. This method releases the previous dispatch queue, if any, and retains the new object in the `dataQueue` parameter.

---

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)