2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Disable the POSIX & Linux core count until stable.

Some methods for quering the cpu counts are unreliable when run
in a container or other cpuset restrictions. Disable them to prefer
the std query.
This commit is contained in:
Rene Rivera
2019-06-14 23:48:59 -05:00
parent 495410e2c1
commit 9e4bb2e28b

View File

@@ -100,10 +100,10 @@ unsigned int b2::system_info::cpu_core_count()
{
cpu_thread_count_ = macosx_physicalcpu();
}
if (cpu_thread_count_ == 0)
{
cpu_thread_count_ = sysconf_nprocs_configured();
}
// if (cpu_thread_count_ == 0)
// {
// cpu_thread_count_ = sysconf_nprocs_configured();
// }
if (cpu_core_count_ <= 0)
{
cpu_core_count_ = 1;
@@ -117,14 +117,14 @@ unsigned int b2::system_info::cpu_thread_count()
{
cpu_thread_count_ = macosx_logicalcpu();
}
if (cpu_thread_count_ == 0)
{
cpu_thread_count_ = sched_affinity_cpu_count();
}
if (cpu_thread_count_ == 0)
{
cpu_thread_count_ = sysconf_nprocs_online();
}
// if (cpu_thread_count_ == 0)
// {
// cpu_thread_count_ = sched_affinity_cpu_count();
// }
// if (cpu_thread_count_ == 0)
// {
// cpu_thread_count_ = sysconf_nprocs_online();
// }
if (cpu_thread_count_ == 0)
{
cpu_thread_count_ = std_thread_hardware_concurrency();