---
title: "perform(_:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nspersistentstorecoordinator/perform(_:)-74udx"
---

# perform(_:)

Executes the provided closure asynchronously on the coordinator’s queue and awaits the result.

## Declaration

```swift
@preconcurrency func perform<T>(_ block: @escaping @Sendable () throws -> T) async rethrows -> T
```

## Parameters

- `block`: The closure to execute.

## See Also

### Performing tasks

- [performAndWait(_:)](coredata/nspersistentstorecoordinator/performandwait(_:)-15ude.md)
- [perform(_:)](coredata/nspersistentstorecoordinator/perform(_:)-7jqb.md)
- [performAndWait(_:)](coredata/nspersistentstorecoordinator/performandwait(_:)-d3kq.md)
- [execute(_:with:)](coredata/nspersistentstorecoordinator/execute(_:with:).md)
