MCPcopy Create free account
hub / github.com/microsoft/SandDance / getWorkerFarm

Function getWorkerFarm

docs/app/js/sanddance-app.js:56832–56843  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56830exports.default = parseWithWorker;
56831var _workerFarm = null;
56832function getWorkerFarm() {
56833 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
56834 var props = {};
56835 if (options.maxConcurrency) props.maxConcurrency = options.maxConcurrency;
56836 if (options.onDebug) props.onDebug = options.onDebug;
56837 if ("reuseWorkers" in options) props.reuseWorkers = options.reuseWorkers;
56838 if (!_workerFarm) _workerFarm = new (0, _loaderUtils._WorkerFarm)({
56839 onMessage: onWorkerMessage
56840 });
56841 _workerFarm.setProps(props);
56842 return _workerFarm;
56843}
56844function onWorkerMessage(_x) {
56845 return _onWorkerMessage.apply(this, arguments);
56846}

Callers 1

parseWithWorkerFunction · 0.70

Calls 1

setPropsMethod · 0.45

Tested by

no test coverage detected