Add a task to the queue
If you want to add a lot of tasks at once, consider setting autoRun to false and calling run() manually after adding all tasks to avoid multiple redundant calls to run().
autoRun
run()
The task to add
Whether to automatically run the queue after adding the task (default: true)
A promise that resolves or rejects with the task's result
Run tasks from the queue up to the concurrency limit
Add a task to the queue
If you want to add a lot of tasks at once, consider setting
autoRun
to false and callingrun()
manually after adding all tasks to avoid multiple redundant calls torun()
.