Skip to content

Instantly share code, notes, and snippets.

@rudyjahchan
Created February 28, 2014 18:19
Show Gist options
  • Save rudyjahchan/9276642 to your computer and use it in GitHub Desktop.
Save rudyjahchan/9276642 to your computer and use it in GitHub Desktop.
child_process = require 'child_process'
numCPUs = require('os').cpus().length
exports = module.exports = launch: ->
console.log 'Before fork'
child_process.fork("#{__dirname}/another_process") for i in [0...numCPUs]
console.log 'After fork'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment