Update cluster shim for Bun (yet again)
This commit is contained in:
parent
c3fee277ec
commit
3eb7249c15
1 changed files with 2 additions and 6 deletions
|
@ -26,9 +26,7 @@ if (!process.singleThreaded) {
|
||||||
cluster.worker = {
|
cluster.worker = {
|
||||||
id: parseInt(process.env.NODE_UNIQUE_ID),
|
id: parseInt(process.env.NODE_UNIQUE_ID),
|
||||||
process: process,
|
process: process,
|
||||||
isDead: () => {
|
isDead: () => false,
|
||||||
return false;
|
|
||||||
},
|
|
||||||
send: (message, ...params) => {
|
send: (message, ...params) => {
|
||||||
process.send(message, ...params);
|
process.send(message, ...params);
|
||||||
},
|
},
|
||||||
|
@ -98,9 +96,7 @@ if (!process.singleThreaded) {
|
||||||
});
|
});
|
||||||
|
|
||||||
newWorker.process = newWorker;
|
newWorker.process = newWorker;
|
||||||
newWorker.isDead = () => {
|
newWorker.isDead = () => newWorker.exitCode !== null || newWorker.killed;
|
||||||
return newWorker.exitCode !== null || newWorker.killed;
|
|
||||||
};
|
|
||||||
newWorker.id = newEnvironment.NODE_UNIQUE_ID;
|
newWorker.id = newEnvironment.NODE_UNIQUE_ID;
|
||||||
|
|
||||||
function checkSendImplementation(worker) {
|
function checkSendImplementation(worker) {
|
||||||
|
|
Loading…
Reference in a new issue