/** * A fixed-size, async queue, implemented on top of a circular buffer. */ export declare class AsyncQueue { /** * The circular buffer that backs the queue. */ private readonly items; /** * The position of the first element in `items`. Calling `pop()` returns `items[start]` * (if non-empty). */ private start; /** * The number of elements currently sitting in the queue. This can never exceed * `items.length`. */ private len; private onReadyToPush; private onReadyToPop; private triggerReadyToPush; private triggerReadyToPop; constructor(maxSize: number); get size(): number; get maxSize(): number; isEmpty(): boolean; isFull(): boolean; /** * Adds a new element to the end of the queue. If the queue is full, waits until at * least one element is popped. */ push(item: Item): Promise; /** * Removes one element from the start of the queue. If the queue is empty, waits until * at least one element is pushed. */ pop(): Promise; [Symbol.iterator](): Generator; clear(): void; } //# sourceMappingURL=asyncQueue.d.ts.map