We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
nodejs
Learn more about funding links in repositories.
Report abuse
1 parent 30d21fb commit 4165312Copy full SHA for 4165312
test/parallel/test-worker-terminate-null-handler.js
@@ -11,13 +11,9 @@ const { parentPort } = require('worker_threads');
11
parentPort.postMessage({ hello: 'world' });
12
`, { eval: true });
13
14
-process.once('beforeExit', common.mustCall(() => {
15
- console.log('beforeExit');
16
- worker.ref();
17
-}));
+process.once('beforeExit', common.mustCall(() => worker.ref()));
18
19
worker.on('exit', common.mustCall(() => {
20
- console.log('exit');
21
worker.terminate().then((res) => assert.strictEqual(res, undefined));
22
worker.terminate(() => null).then(
23
(res) => assert.strictEqual(res, undefined)
0 commit comments