Class: Queue

Queue(_maxConcurrent, _minCycle)

new Queue(_maxConcurrent, _minCycle)

Parameters:
Name Type Description
_maxConcurrent number Number of tasks allowed to run simultaneously
_minCycle number Minimum number of milliseconds between two tasks
Source:

Methods

end(hash)

Parameters:
Name Type Description
hash * Unique hash identifying the task
Source:

(async) flush() → {Promise}

Source:
Returns:
returns when the queue is empty
Type
Promise

stat() → {object}

Source:
Returns:
running, waiting, last
Type
object

(async) wait(hash, priority) → {Promise}

Parameters:
Name Type Description
hash * Unique hash identifying the task
priority number
Source:
Returns:
Resolved when the task is ready to run
Type
Promise