You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to use the node:cluster module to cluster.fork() throws an error Error: Not implemented: cluster.fork
Code to duplicate:
importclusterfrom'node:cluster';importhttpfrom'node:http';import{availableParallelism}from'node:os';importprocessfrom'node:process';constnumCPUs=availableParallelism();if(cluster.isPrimary){console.log(`Primary ${process.pid} is running`);// Fork workers.for(leti=0;i<numCPUs;i++){cluster.fork();console.log('fork cpu:',i);}}else{// Workers can share any TCP connection// In this case it is an HTTP serverhttp.createServer((req,res)=>{res.writeHead(200);res.end('hello world\n');}).listen(8000);console.log(`Worker ${process.pid} started`);}
The text was updated successfully, but these errors were encountered:
FYI: The node:cluster module is not supported in Deno at the moment. All module exports are non-functional stubs, see https://docs.deno.com/api/node/cluster/
Version: Deno v2.1.4
Attempting to use the node:cluster module to cluster.fork() throws an error
Error: Not implemented: cluster.fork
Code to duplicate:
The text was updated successfully, but these errors were encountered: