Browse Source

doc: replace references to cluster.autoFork

v0.8.7-release
Andreas Madsen 13 years ago
committed by Ben Noordhuis
parent
commit
3d51646c4b
  1. 8
      doc/api/cluster.markdown

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);
});

Loading…
Cancel
Save