Merge pull request #14493 from nnorwitz/patch-1

Use the total # of processors instead of # online.
reviewable/pr14459/r1^2
Noah Eisen 7 years ago committed by GitHub
commit 710704feac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/lib/gpr/cpu_linux.cc

@ -45,7 +45,7 @@ static void init_num_cpus() {
#endif
/* This must be signed. sysconf returns -1 when the number cannot be
determined */
ncpus = static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
ncpus = static_cast<int>(sysconf(_SC_NPROCESSORS_CONF));
if (ncpus < 1) {
gpr_log(GPR_ERROR, "Cannot determine number of CPUs: assuming 1");
ncpus = 1;

Loading…
Cancel
Save