UNPKG

mapbox-gl

Version:
17 lines (14 loc) 378 B
'use strict'; var WorkerPool = require('./util/worker_pool'); var 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; };