AsyncQueue
AsyncQueue
A queue class for limiting concurrent async tasks. This can be used e.g. to prevent race conditions when working on a shared resource such as writing to a database.
Signature
class AsyncQueue {
constructor(label: string = 'default', concurrency: number = 1)
push(task: Task<T>) => Promise<T>;
}
Members
constructor
(label: string = 'default', concurrency: number = 1) => AsyncQueue
push
(task: Task<T>) => Promise<T>