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

Function test

test/parallel/test-worker-terminate-unrefed.js:9–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7// still resolves the returned Promise.
8
9async function test() {
10 const worker = new Worker('setTimeout(() => {}, 1000000);', { eval: true });
11 await once(worker, 'online');
12 worker.unref();
13 await worker.terminate();
14}
15
16test().then(common.mustCall());

Calls 3

unrefMethod · 0.95
terminateMethod · 0.95
onceFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…