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 |
Methods
end(hash)
Parameters:
| Name | Type | Description |
|---|---|---|
hash |
* | Unique hash identifying the task |
(async) flush() → {Promise}
Returns:
returns when the queue is empty
- Type
- Promise
stat() → {object}
Returns:
running, waiting, last
- Type
- object
(async) wait(hash, priority) → {Promise}
Parameters:
| Name | Type | Description |
|---|---|---|
hash |
* | Unique hash identifying the task |
priority |
number |
Returns:
Resolved when the task is ready to run
- Type
- Promise