/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0. See LICENSE file in the project root for details. ***************************************************************************** */ /** * An asynchronous queue. */ export declare class AsyncQueue { private _available; private _pending; /** * Initializes a new instance of the AsyncQueue class. * * @param iterable An optional iterable of values or promises. */ constructor(iterable?: Iterable>); /** * Gets the number of entries in the queue. * When positive, indicates the number of entries available to get. * When negative, indicates the number of requests waiting to be fulfilled. */ get size(): number; /** * Adds a value to the end of the queue. If the queue is empty but has a pending * dequeue request, the value will be dequeued and the request fulfilled. * * @param value A value or promise to add to the queue. */ put(value: T | PromiseLike): void; /** * Removes and returns a Promise for the first value in the queue. If the queue is empty, * returns a Promise for the next value to be added to the queue. */ get(): Promise; }