performAndWait(_:)
Submits a closure to the context’s queue for synchronous execution.
Declaration
@preconcurrency nonisolated func performAndWait<T>(_ block: @Sendable () throws -> T) rethrows -> TParameters
- block:
The closure to perform.
Discussion
This method supports reentrancy — meaning it’s safe to call the method again, from within the closure, before the previous invocation completes.