This module provides a class to organize a [[WorkerQueue]] data structure. See core/queue/worker and core/queue for more information.
core/queue/worker
core/queue
import WorkerQueue from 'core/queue/worker/simple';const queue = new WorkerQueue((task) => { console.log(task);}, {concurrency: 2});queue.push({a: 1});console.log(queue.length); // 0queue.push({a: 2});console.log(queue.length); // 0queue.push({a: 3});console.log(queue.length); // 1queue.push({a: 4});console.log(queue.length); // 2queue.clear();console.log(queue.length); // 0
core/queue/worker/simple
This module provides a class to organize a [[WorkerQueue]] data structure. See
core/queue/worker
andcore/queue
for more information.