mirror of https://github.com/lukechilds/node.git
Browse Source
PR-URL: https://github.com/nodejs/node/pull/5517 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>v5.x
Rich Trott
9 years ago
committed by
Jeremiah Senkpiel
16 changed files with 60 additions and 26 deletions
@ -1,10 +1,11 @@ |
|||
'use strict'; |
|||
var cluster = require('cluster'); |
|||
var os = require('os'); |
|||
const cluster = require('cluster'); |
|||
const os = require('os'); |
|||
const path = require('path'); |
|||
|
|||
if (cluster.isMaster) { |
|||
console.log('master running on pid %d', process.pid); |
|||
for (var i = 0, n = os.cpus().length; i < n; ++i) cluster.fork(); |
|||
} else { |
|||
require(__dirname + '/http_simple.js'); |
|||
require(path.join(__dirname, 'http_simple.js')); |
|||
} |
|||
|
Loading…
Reference in new issue