We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
nodejs
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent bd996bf commit 30310bfCopy full SHA for 30310bf
doc/api/cluster.md
@@ -317,6 +317,7 @@ if (cluster.isPrimary) {
317
```cjs
318
const cluster = require('node:cluster');
319
const http = require('node:http');
320
+const numCPUs = require('node:os').availableParallelism();
321
const process = require('node:process');
322
323
if (cluster.isPrimary) {
@@ -335,7 +336,6 @@ if (cluster.isPrimary) {
335
336
}
337
338
// Start workers and listen for messages containing notifyRequest
- const numCPUs = require('node:os').availableParallelism();
339
for (let i = 0; i < numCPUs; i++) {
340
cluster.fork();
341
0 commit comments