index.js 287 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 'use strict' let workerFarm = require('../../') , workers = workerFarm(require.resolve('./child')) , ret = 0 for (let i = 0; i < 10; i++) { workers('#' + i + ' FOO', function (err, outp) { console.log(outp) if (++ret == 10) workerFarm.end(workers) }) }