Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
doc: replace references to cluster.autoFork
  • Loading branch information
AndreasMadsen authored and bnoordhuis committed Jun 25, 2012
1 parent 41a4b73 commit 3d51646
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/api/cluster.markdown
Expand Up @@ -233,7 +233,7 @@ Example:
args : ["--use", "https"],
silent : true
});
cluster.autoFork();
cluster.fork();

## cluster.fork([env])

Expand Down Expand Up @@ -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);
});
Expand Down

0 comments on commit 3d51646

Please sign in to comment.