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
promise: Promise<RunQueueEntryResult<T>>

The promised value

wasCanceled: (() => boolean)

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

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.

wasStarted: (() => boolean)

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