Skip to content

TaskQueue

Task queuing system

It makes sure that the tasks of a Queue are processed one after the other, instead of all at the same time.

new TaskQueue(): TaskQueue;

TaskQueue

get hasPlayTask(): boolean;

Whether or not having a play task

boolean


get remaining(): number;

The remaining number of tasks

number

queuing(isPlay?): Promise<void>;

Waits for last task finished and queues a new task

boolean = false

Whether the task is a play task

Promise<void>

A promise that resolves when the last queued task is finished


resolve(): void;

Removes the finished task and processes the next task

void

Nothing