Methods
-
queue(generator, key)
-
Queues a new task
Parameters:
Name Type Description generatorfunction A function that returns a Promise (the task to be executed)
keystring The key that this task should queue under. If more tasks with the same key are already running (or queued), this task will execute after they resolve
- Source:
Returns:
A promise that resolves with the result of the generator function
- Type
- Promise