Contents

perform(schedule:_:)

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

Declaration

@preconcurrency nonisolated func perform<T>(schedule: NSManagedObjectContext.ScheduledTaskType = .immediate, _ block: @escaping  @Sendable () throws -> T) async rethrows -> T

Parameters

  • schedule:

    The required execution schedule. For more information, see Scheduledtasktype.

  • block:

    The closure to perform.

See Also

Performing block operations