Interface RunQueueEntry<T>

An entry reference, which can be used to cancel the entry, check its status, or to get the promised value.

interface RunQueueEntry<T> {
    cancel: (() => void);
    promise: Promise<RunQueueEntryResult<T>>;
    wasCanceled: (() => boolean);
    wasCompleted: (() => boolean);
    wasStarted: (() => boolean);
}

Type Parameters

  • T

Properties

cancel: (() => void)

Tries to cancel the entry. Cancelation may not be possible if:

  • the entry is already canceled or completed
  • the entry is marked as neverCancel

Type declaration

    • (): void
    • Tries to cancel the entry. Cancelation may not be possible if:

      • the entry is already canceled or completed
      • the entry is marked as neverCancel

      Returns void

promise: Promise<RunQueueEntryResult<T>>

The promised value

wasCanceled: (() => boolean)

If true, the entry was canceled. It may or may not have already been started.

Type declaration

    • (): boolean
    • If true, the entry was canceled. It may or may not have already been started.

      Returns boolean

wasCompleted: (() => boolean)

If true, the entry was completed either successfully or not. wasStarted will always be true if wasCompleted is true. wasCanceled will never be true if wasCompleted is true.

Type declaration

    • (): boolean
    • If true, the entry was completed either successfully or not. wasStarted will always be true if wasCompleted is true. wasCanceled will never be true if wasCompleted is true.

      Returns boolean

wasStarted: (() => boolean)

If true, the entry was started. It may or may not also be either canceled or completed.

Type declaration

    • (): boolean
    • If true, the entry was started. It may or may not also be either canceled or completed.

      Returns boolean

Generated using TypeDoc