node:worker_threads low-hanging fruit (#18758)

Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
Co-authored-by: Ashcon Partovi <ashcon@partovi.net>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
Co-authored-by: Don Isaac <donald.isaac@gmail.com>
Co-authored-by: chloe caruso <git@paperclover.net>
This commit is contained in:
190n
2025-04-08 05:29:53 -07:00
committed by GitHub
parent ca8b7fb36e
commit eee5d4fb4a
25 changed files with 459 additions and 116 deletions

View File

@@ -23,7 +23,7 @@ const { Worker } = require('worker_threads');
});
w.on('message', common.mustCall(() => {
assert.strictEqual(local.toString(), 'Hello world!');
global.gc();
globalThis.gc();
w.terminate();
}));
w.postMessage({});