diff options
author | Noah Eisen <ncteisen@gmail.com> | 2018-02-26 09:25:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 09:25:46 -0800 |
commit | 710704feac930ac38ae13986ad3899d4465adba4 (patch) | |
tree | 97b8311cf23bab96b38359ffc4339a11eda7067e /src | |
parent | d5b1f9809202bf2338f94a9e1c07bc511b42d67d (diff) | |
parent | c546ee6ff78a5e742e6f73e4c64a53e50a63a047 (diff) |
Merge pull request #14493 from nnorwitz/patch-1
Use the total # of processors instead of # online.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/gpr/cpu_linux.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/gpr/cpu_linux.cc b/src/core/lib/gpr/cpu_linux.cc index 4782f9f742..fda28916f8 100644 --- a/src/core/lib/gpr/cpu_linux.cc +++ b/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; |