Constructor
new Queue(context)
Parameters:
Name | Type | Description |
---|---|---|
context |
scope | what this will resolve to in the tasks |
- Source:
Methods
clear() → {void}
Clear all items in wait
.Clear all items in wait
- Source:
Returns:
- Type
- void
dequeue() → {Promise}
Run one item
.Run one item
- Source:
Returns:
dequeued
- Type
- Promise
enqueue() → {Promise}
Add an item to the queue
.Add an item to the queue
- Source:
Returns:
enqueued
- Type
- Promise
flush() → {Promise}
Flush all, as quickly as possible
.Flush all, as quickly as possible
- Source:
Returns:
ran
- Type
- Promise
length() → {number}
Get the number of tasks in the queue
.Get the number of tasks in the queue
- Source:
Returns:
tasks
- Type
- number
pause() → {void}
Pause a running queue
.Pause a running queue
- Source:
Returns:
- Type
- void
run() → {Promise}
Run all tasks sequentially, at convince
.Run all tasks sequentially, at convince
- Source:
Returns:
all run
- Type
- Promise
stop() → {void}
End the queue
.End the queue
- Source:
Returns:
- Type
- void