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

Function startWorker

test/parallel/test-inspector-workers-flat-list.js:44–49  ·  view source on GitHub ↗
(depth, messageCallback)

Source from the content-addressed store, hash-verified

42}
43
44function startWorker(depth, messageCallback) {
45 const worker = new Worker(__filename, { workerData: 'launched by test' });
46 worker.on('message', messageCallback);
47 worker.postMessage({ depth });
48 return worker;
49}
50
51function runMainThread() {
52 rootWorker = startWorker(1, processMessage);

Callers 2

runMainThreadFunction · 0.70
runChildWorkerThreadFunction · 0.70

Calls 2

postMessageMethod · 0.95
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…