The TaskExecutor is a task execution list, tasks can be added and will be executed one after another.
Implementation hint: Pushed task are queued and executed as micro tasks in the next event queue slot.
Example: _Use default export_
importTaskExecutorfrom"apprt-core/TaskExecutor"; constexecutor = newTaskExecutor(); consttask = function(){ doSomething(); }; // execute the task as fast as possible executor.push(task); // add again (will drop the old add, as long as the task was not executed) executor.push(task);
The TaskExecutor is a task execution list, tasks can be added and will be executed one after another. Implementation hint: Pushed task are queued and executed as micro tasks in the next event queue slot.
Example: _Use default export_