UNPKG

mapbox-gl

Version:
17 lines (14 loc) 375 B
'use strict'; 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; };