projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41a4b73
)
doc: replace references to cluster.autoFork
author
Andreas Madsen
<amwebdk@gmail.com>
Mon, 25 Jun 2012 16:53:35 +0000
(18:53 +0200)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Mon, 25 Jun 2012 21:17:18 +0000
(23:17 +0200)
doc/api/cluster.markdown
patch
|
blob
|
history
diff --git
a/doc/api/cluster.markdown
b/doc/api/cluster.markdown
index
1332bd4
..
059037b
100644
(file)
--- a/
doc/api/cluster.markdown
+++ b/
doc/api/cluster.markdown
@@
-233,7
+233,7
@@
Example:
args : ["--use", "https"],
silent : true
});
- cluster.
autoF
ork();
+ cluster.
f
ork();
## 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);
});