MCPcopy Index your code
hub / github.com/nodejs/node / runWorker

Function runWorker

test/parallel/test-worker-debug.js:63–70  ·  view source on GitHub ↗
(id, workerCallback = () => {})

Source from the content-addressed store, hash-verified

61}
62
63function runWorker(id, workerCallback = () => {}) {
64 return new Promise((resolve, reject) => {
65 const worker = new Worker(__filename, { workerData: id });
66 workerCallback(worker);
67 worker.on('error', reject);
68 worker.on('exit', resolve);
69 });
70}
71
72class WorkerSession extends EventEmitter {
73 constructor(parentSession, id) {

Callers 5

testBasicWorkerDebugFunction · 0.70
testNoWaitOnStartFunction · 0.70
testTwoWorkersFunction · 0.70

Calls 2

workerCallbackFunction · 0.85
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…