Scheduler

public protocol Scheduler : AnyObject

Represents a serial queue of work items.

  • Enqueues an action on the scheduler.

    When the work is executed depends on the scheduler in use.

    Declaration

    Swift

    @discardableResult
    func schedule(_ action: @escaping () -> Void) -> Disposable?

    Parameters

    action

    The action to be scheduled.

    Return Value

    Optional Disposable that can be used to cancel the work before it begins.