Fetches the next resolved item from the queue in FIFO order. If no items are currently resolved but pending promises exist, it waits until the next one resolves.
The next resolved value, or undefined if there are no
pending or queued items.
Returns the number of promises that are still pending (in-flight).
The number of unresolved promises currently in the queue.
Returns the number of items that have already resolved but have not yet been fetched by a consumer.
The number of resolved items waiting to be consumed.
Returns the total number of items currently tracked by the queue, including both pending (in-flight) promises and resolved items that have not yet been fetched.
The sum of pending and queued items.
Waits for all currently pending promises to settle.
A promise that resolves once every in-flight promise has resolved.
AsyncFifoQueue
A minimal FIFO queue for asynchronous operations. Allows adding asynchronous operations and consume them in the order they are resolved.