|
|
@ -128,7 +128,7 @@ function handleWorkerMessage(worker, message) { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cluster.eachWorker = function(cb) { |
|
|
|
function eachWorker(cb) { |
|
|
|
// This can only be called from the master.
|
|
|
|
assert(cluster.isMaster); |
|
|
|
|
|
|
@ -140,15 +140,6 @@ cluster.eachWorker = function(cb) { |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
cluster.workerCount = function() { |
|
|
|
var c = 0; |
|
|
|
cluster.eachWorker(function() { |
|
|
|
c++; |
|
|
|
}); |
|
|
|
return c; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
cluster.fork = function() { |
|
|
|
// This can only be called from the master.
|
|
|
|
assert(cluster.isMaster); |
|
|
|