The BlockingTaskExecutor is a task execution list, which executes tasks one after another. The difference to the TaskExecutor is that it only uses macro tasks and that task executions can be tracked by clients.

const executor = new BlockingTaskExecutor();
const task = () => { doSomething(); }; // ... };
// execute the task if others pushed before are finished.
const result = await executor.push(task);

Accessors

Methods

Accessors

  • get length(): number
  • Number of waiting tasks.

    Returns number

Methods

  • Cancels all tasks in the queue, as well as the currently running one.

    Returns void