src/platformsh.js
function num_of_cpus() {
  try {
    if(process.env['OMP_NUM_THREADS']) {
      return process.env['OMP_NUM_THREADS'];
    }

    return Math.ceil(jsonConfig.info.limits.cpu);
  } catch (err) {
    throw new Error('Could not get number of cpus');
  }
}
function num_of_cpus() {
  try {
    if(process.env['OMP_NUM_THREADS']) {
      return process.env['OMP_NUM_THREADS'];
    }

    return Math.ceil(jsonConfig.info.limits.cpu);
  } catch (err) {
    throw new Error('Could not get number of cpus');
  }
}
function num_of_cpus ( ) { try { if ( process . env [ 'OMP_NUM_THREADS' ] ) { return process . env [ 'OMP_NUM_THREADS' ] ; } return Math . ceil ( jsonConfig . info . limits . cpu ) ; } catch ( err ) { throw new Error ( 'Could not get number of cpus' ) ; } }
Read number of CPUs from environment or fallback to the _private_ configuration property
Useful for determining the number of processes to fork.
Read number of CPUs from environment or fallback to the _private_ configuration property Useful for determining the number of processes to fork .