The AsyncQueue class is an async-aware data structure that provides a queue-like behavior for managing asynchronous tasks or operations. It allows to enqueue items and dequeue them asynchronously. This is not thread-safe, but it is async concurrency safe, and it does not guarantee ordering for those that call into and await on enqueue.

interface PendingDequeue<T> {
    reject: (reason?: AsyncQueueCancelledError) => void;
    resolve: (value: T) => void;
}

Type Parameters

  • T

Properties

Properties

reject: (reason?: AsyncQueueCancelledError) => void
resolve: (value: T) => void
MMNEPVFCICPMFPCPTTAAATR