---
title: synchronize()
framework: opendirectory
role: symbol
role_heading: Instance Method
path: opendirectory/odquery/synchronize()
---

# synchronize()

Restarts a query, disposing of any results it has obtained.

## Declaration

```swift
func synchronize()
```

## Discussion

Discussion If the query was originally scheduled in a run loop with schedule(in:forMode:), the delegate is called with inResults set to nil, [inError code] set to kODErrorQuerySynchronize, and [inError domain] set to kODErrorDomainFramework.

## See Also

### Managing Asynchronous Queries

- [delegate](opendirectory/odquery/delegate.md)
- [operationQueue](opendirectory/odquery/operationqueue.md)
- [schedule(in:forMode:)](opendirectory/odquery/schedule(in:formode:).md)
- [remove(from:forMode:)](opendirectory/odquery/remove(from:formode:).md)
