new Scheduler( [opts])
Parameters:
| Name | Type | Argument | Default | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object |
<optional> |
{} |
Properties
|
Members
-
<static> Constants :Constants
-
Type:
- Constants
-
<static> SubScheduler :SubScheduler
-
Type:
-
<static> Task :Task
-
Type:
Methods
-
abort()
-
Abort any pending tasks.
-
createSubScheduler()
-
Create a sub-scheduler.
-
postTask(fn [, taskOpts] [, opts])
-
Add a task to the scheduler.
Parameters:
Name Type Argument Default Description fnTask | function taskOptsObject <optional>
{} optsObject <optional>
{} Properties
Name Type Argument Default Description unshiftBoolean <optional>
false Returns:
Resolves when the task has finished.
- Type
- Promise
-
postTasks(fns [, taskOpts] [, opts])
-
Add an array of tasks to the scheduler.
Parameters:
Name Type Argument Default Description fnsArray taskOptsObject <optional>
{} optsObject <optional>
{} Properties
Name Type Argument Default Description unshiftBoolean <optional>
false Returns:
Resolves when all tasks in
fnshave finished.- Type
- Promise