Interface Scheduler

interface Scheduler {
    isPending(): boolean;
    schedule<T>(action: AbortableCallback<T>): AbortablePromise<T>;
}

Methods

  • Returns true if scheduler currently has a pending action, or false otherwise.

    Returns boolean

  • Schedules an action callback invocation after all previously scheduled actions are completed.

    The action callback receives a non-aborted signal.

    Type Parameters

    • T

      The result of an action.

    Parameters

    Returns AbortablePromise<T>

    The promise that is settled when the action completes.