From bbc211906dcd5043af549250343cd7b42fb45043 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Thu, 14 Mar 2024 01:22:53 +0530 Subject: fix(ext/node): make worker ids sequential (#22884) --- ext/node/polyfills/02_init.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ext/node/polyfills/02_init.js') diff --git a/ext/node/polyfills/02_init.js b/ext/node/polyfills/02_init.js index 04820b837..85f924493 100644 --- a/ext/node/polyfills/02_init.js +++ b/ext/node/polyfills/02_init.js @@ -14,6 +14,7 @@ function initialize( usesLocalNodeModulesDir, argv0, runningOnMainThread, + workerId, maybeWorkerMetadata, ) { if (initialized) { @@ -39,7 +40,11 @@ function initialize( // FIXME(bartlomieju): not nice to depend on `Deno` namespace here // but it's the only way to get `args` and `version` and this point. internals.__bootstrapNodeProcess(argv0, Deno.args, Deno.version); - internals.__initWorkerThreads(runningOnMainThread, maybeWorkerMetadata); + internals.__initWorkerThreads( + runningOnMainThread, + workerId, + maybeWorkerMetadata, + ); internals.__setupChildProcessIpcChannel(); // `Deno[Deno.internal].requireImpl` will be unreachable after this line. delete internals.requireImpl; -- cgit v1.2.3