Type Parameters

  • T

Implementation - Transactions

Constructors

Properties

Implementation - Transactions

  • Cancels all pending promises in the queue and rejects them with an AsyncQueueCancelledError. This ensures that any awaiting code can handle the cancellation appropriately.

    Returns void

  • Dequeues the next item from the queue and returns a promise that resolves to it. If the queue is empty, it creates a new promise that will be resolved when an item is enqueued.

    Returns Promise<T>

    Promise

  • Adds an item to the queue. If there are pending dequeued promises, it resolves the oldest promise with the enqueued item immediately; otherwise, it adds the item to the queue.

    Parameters

    • item: T

      The item to be added to the queue.

    Returns void

Constructors

Properties

queue: T[] = []
MMNEPVFCICPMFPCPTTAAATR