Use createTaskQueue to construct a new TaskQueue.
A comparator for comparing two task priorities.
The default priority if not provided. If comparator is nullish priority values will have no effect.
ReadonlycomparatorA comparator for comparing two task priorities.
ReadonlydefaultThe default priority if not provided. If comparator is nullish priority values will have no effect.
How many tasks are currently running.
How many simultaneous tasks may be run at a time. Reducing this will not abort currently running tasks.
Enqueues the given task, returning a Promise that settles when the task is complete.
A function that is optionally asynchronous.
The priority of the task. If not provided, defaultPriority() will be used.
A TaskQueue runs actions in a sequence, with the ability to abort the queued tasks.