Constructor
new TaskStackSync(listeneropt, nullable)
Create a new TaskStackSync
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
listener | StackListener | <optional> <nullable> | null | listener for task results; optional for this class, since you can be guaranteed tasks are run sequentially |
- Source
Classes
Members
(nullable) listener :StackListener
Listener for results
- Source
Methods
add(task, …args)
Adds another task to be run
Name | Type | Attributes | Description |
---|---|---|---|
task | function | | ||
args | any | <repeatable> | arguments to pass to the TaskStackSync#listener (not the task!) |
- Source
empty() → {Promise}
Returns promise which resolves when stack is empty
- Source
- Type:
- Promise