Extensible async task queue.
const queue = new TaskQueue((task, next) => { task.fn(task.opts, next) })
Function called when task is processed.
TaskQueue configuration options.
Add item(s) to queue. Optionally being processing queue.
queue.add({ 'id': 1, args: arguments }, true)
An array or single task to add to queue.
Clear all currently queued tasks.
queue.clear()
Check to determine if queue is empty. Queue is considered empty if the tasks array has a length of 0.
queue.isEmpty()
Pauses a queue. If the queue was processing, the queue will halt moving to the next task. The current task will continue executing.
queue.pause()
Proccess task found at the head of the queue.
queue.process()
Resumes a paused queue. If queue was paused while processing, it will continue to process.
queue.resume()
Generated using TypeDoc
Extensible async task queue.
const queue = new TaskQueue((task, next) => { task.fn(task.opts, next) })