Update cluster shim for Bun (yet again)

This commit is contained in:
Dorian Niemiec 2024-08-29 19:28:07 +02:00
parent c3fee277ec
commit 3eb7249c15

View file

@ -26,9 +26,7 @@ if (!process.singleThreaded) {
cluster.worker = {
id: parseInt(process.env.NODE_UNIQUE_ID),
process: process,
isDead: () => {
return false;
},
isDead: () => false,
send: (message, ...params) => {
process.send(message, ...params);
},
@ -98,9 +96,7 @@ if (!process.singleThreaded) {
});
newWorker.process = newWorker;
newWorker.isDead = () => {
return newWorker.exitCode !== null || newWorker.killed;
};
newWorker.isDead = () => newWorker.exitCode !== null || newWorker.killed;
newWorker.id = newEnvironment.NODE_UNIQUE_ID;
function checkSendImplementation(worker) {