<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "OpenDirectory",
  "identifier" : "/documentation/OpenDirectory/ODQuerySetDispatchQueue(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Open Directory"
    ],
    "preciseIdentifier" : "c:@F@ODQuerySetDispatchQueue"
  },
  "title" : "ODQuerySetDispatchQueue(_:_:)"
}
-->

# ODQuerySetDispatchQueue(_:_:)

Retrieves results from a query asynchronously by adding the query to a dispatch queue.

```
func ODQuerySetDispatchQueue(_ query: ODQueryRef!, _ queue: dispatch_queue_t!)
```

## Parameters

`query`

The query.

`queue`

The dispatch queue.

## Discussion

When the query is complete, the query’s callback function is called with both `inResults` and `inError` set to `NULL`.

## See Also

[`ODQueryCallback`](/documentation/OpenDirectory/ODQueryCallback)

A callback function called as results from a scheduled query are returned.



---

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)