Contents

performAndWait(_:)

Submits a closure to the context’s queue for synchronous execution.

Declaration

@preconcurrency nonisolated func performAndWait<T>(_ block: @Sendable () throws -> T) rethrows -> T

Parameters

  • 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.

See Also

Performing block operations