PHP 7.4.33
Preview: WorkerPool.js Size: 1.03 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/jest-worker/build/WorkerPool.js
'use strict';

Object.defineProperty(exports, '__esModule', {
  value: true
});
exports.default = void 0;
var _BaseWorkerPool = _interopRequireDefault(require('./base/BaseWorkerPool'));
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {default: obj};
}
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

class WorkerPool extends _BaseWorkerPool.default {
  send(workerId, request, onStart, onEnd, onCustomMessage) {
    this.restartWorkerIfShutDown(workerId);
    this.getWorkerById(workerId).send(request, onStart, onEnd, onCustomMessage);
  }
  createWorker(workerOptions) {
    let Worker;
    if (this._options.enableWorkerThreads) {
      Worker = require('./workers/NodeThreadsWorker').default;
    } else {
      Worker = require('./workers/ChildProcessWorker').default;
    }
    return new Worker(workerOptions);
  }
}
var _default = WorkerPool;
exports.default = _default;

Directory Contents

Dirs: 2 × Files: 7
Name Size Perms Modified Actions
base DIR
- drwxr-xr-x 2025-03-28 11:04:32
Edit Download
workers DIR
- drwxr-xr-x 2025-03-28 11:04:32
Edit Download
4.19 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
2.21 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
10.16 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
5.95 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
3.86 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
2.47 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
1.03 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).