Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

doc: replace references to cluster.autoFork

  • Loading branch information...
commit 3d51646c4b9e10ccfe901cd48020b32f72bc3b03 1 parent 41a4b73
@AndreasMadsen AndreasMadsen authored bnoordhuis committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 doc/api/cluster.markdown
View
8 doc/api/cluster.markdown
@@ -233,7 +233,7 @@ Example:
args : ["--use", "https"],
silent : true
});
- cluster.autoFork();
+ cluster.fork();
## cluster.fork([env])
@@ -436,7 +436,11 @@ in the master process using the message system:
}
// Start workers and listen for messages containing notifyRequest
- cluster.autoFork();
+ var numCPUs = require('os').cpus().length;
+ for (var i = 0; i < numCPUs; i++) {
+ cluster.fork();
+ }
+
Object.keys(cluster.workers).forEach(function(id) {
cluster.workers[id].on('message', messageHandler);
});
Please sign in to comment.
Something went wrong with that request. Please try again.