Fix minor issue with usage of STL thread::hardware_concurrency()

This commit is contained in:
Eladash 2021-01-28 20:33:50 +02:00 committed by Ivan
parent 11ba6e45ab
commit d3bc96a201
9 changed files with 24 additions and 13 deletions

View file

@ -4,6 +4,8 @@
#include <thread>
#include "util/sysinfo.hpp"
namespace gl
{
// Global list of worker threads
@ -97,7 +99,7 @@ namespace gl
if (num_worker_threads == 0)
{
// Select optimal number of compiler threads
const auto hw_threads = std::thread::hardware_concurrency();
const auto hw_threads = utils::get_thread_count();
if (hw_threads > 12)
{
num_worker_threads = 6;