Skip to main content
Version: Next

CreateAsyncQueue

createAsyncQueue

Creates a new async queue instance with the specified configuration.

Example

const controller = new AbortController();
const queue = createAsyncQueue({
concurrency: 2,
signal: controller.signal
});
queue.add(async () => await doSomething());
controller.abort(); // Aborts the queue
Signature
function createAsyncQueue(options?: AsyncQueueOptions): AsyncQueue

Parameters

options