Changed: Reverted back to sysconf(_SC_NPROCESSORS_ONLN) for Cpu core count ant let the new dynamic update fix if cores are turned on later

This commit is contained in:
aristocratos 2022-10-13 09:26:06 +02:00
parent d1056bf423
commit 8a07bc43b4
1 changed files with 1 additions and 2 deletions

View File

@ -26,7 +26,6 @@ tab-size = 4
#include <netdb.h>
#include <ifaddrs.h>
#include <net/if.h>
#include <thread>
#if !(defined(STATIC_BUILD) && defined(__GLIBC__))
#include <pwd.h>
@ -107,7 +106,7 @@ namespace Shared {
if (passwd_path.empty())
Logger::warning("Could not read /etc/passwd, will show UID instead of username.");
coreCount = std::thread::hardware_concurrency();
coreCount = sysconf(_SC_NPROCESSORS_ONLN);
if (coreCount < 1) {
coreCount = sysconf(_SC_NPROCESSORS_CONF);
if (coreCount < 1) {