a queue to ensure async functions are called one after another in order, with option to run some functions in parallel
How to use
TaskQueue17 has one main method:
It is a async function which expects an async function, describing the task, as its first parameter.
The second parameter is a group identifier.
Normally all tasks in the queue will run sequentially.
But consecutive tasks with the same (
===) group will be running in parallel.
If no group is specified,
null is assumed.
null group will always run on its own.
You can pause the queue with
#pause() and resume it with
You can get the current pause-state with
The queue starts unpaused.
const TaskQueue =const taskQueue =const taskA = taskQueueconst taskB = taskQueueconst taskC = taskQueueconst taskD = taskQueuePromisealltaskAtaskBtaskCtaskD