mapbox-gl
Version:
A WebGL interactive maps library
17 lines (14 loc) • 375 B
JavaScript
;
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;
};