Skip to content

Commit

Permalink
Merge pull request grpc#14532 from ncteisen/cpu
Browse files Browse the repository at this point in the history
Remain consistent with grpc#14493
  • Loading branch information
vjpai committed Mar 5, 2018
2 parents 0897bef + dca52e5 commit e5335b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/lib/gpr/cpu_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static long ncpus = 0;
static pthread_key_t thread_id_key;

static void init_ncpus() {
ncpus = sysconf(_SC_NPROCESSORS_ONLN);
ncpus = sysconf(_SC_NPROCESSORS_CONF);
if (ncpus < 1 || ncpus > INT32_MAX) {
gpr_log(GPR_ERROR, "Cannot determine number of CPUs: assuming 1");
ncpus = 1;
Expand Down

0 comments on commit e5335b4

Please sign in to comment.