UNPKG

mapbox-gl

Version:
16 lines (13 loc) 361 B
const WorkerPool = require('./worker_pool'); let globalWorkerPool; /** * Creates (if necessary) and returns the single, global WorkerPool instance * to be shared across each Map * @private */ module.exports = function getGlobalWorkerPool () { if (!globalWorkerPool) { globalWorkerPool = new WorkerPool(); } return globalWorkerPool; };