aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/workerpools.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-10-10 15:34:30 +0200
committerStefan Boberg <[email protected]>2025-10-10 15:34:30 +0200
commit07e2df59856ef71bcac54d47c9d4d35b6f9ba7cd (patch)
tree53b8f7e17e1f57af409e703f0a2ffcb7f90378ab /src/zenutil/workerpools.cpp
parentmade server count dynamic via `--count` argument (diff)
downloadzen-07e2df59856ef71bcac54d47c9d4d35b6f9ba7cd.tar.xz
zen-07e2df59856ef71bcac54d47c9d4d35b6f9ba7cd.zip
added --corelimit option to zenserver
Diffstat (limited to 'src/zenutil/workerpools.cpp')
-rw-r--r--src/zenutil/workerpools.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenutil/workerpools.cpp b/src/zenutil/workerpools.cpp
index 55c91e68e..cd6421e0b 100644
--- a/src/zenutil/workerpools.cpp
+++ b/src/zenutil/workerpools.cpp
@@ -11,9 +11,9 @@ ZEN_THIRD_PARTY_INCLUDES_END
namespace zen {
namespace {
- const int LargeWorkerThreadPoolTreadCount = gsl::narrow<int>(Max(std::thread::hardware_concurrency() - 1u, 2u));
- const int MediumWorkerThreadPoolTreadCount = gsl::narrow<int>(Max((std::thread::hardware_concurrency() / 4u), 2u));
- const int SmallWorkerThreadPoolTreadCount = gsl::narrow<int>(Max((std::thread::hardware_concurrency() / 8u), 1u));
+ const int LargeWorkerThreadPoolTreadCount = gsl::narrow<int>(Max(GetHardwareConcurrency() - 1u, 2u));
+ const int MediumWorkerThreadPoolTreadCount = gsl::narrow<int>(Max((GetHardwareConcurrency() / 4u), 2u));
+ const int SmallWorkerThreadPoolTreadCount = gsl::narrow<int>(Max((GetHardwareConcurrency() / 8u), 1u));
const int TinyWorkerThreadPoolTreadCount = 1;
static bool IsShutDown = false;