From 5ac5be5cacacdb8d6cac2fa362fce6d78e4dc389 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Silva Date: Wed, 23 Aug 2023 16:23:18 -0300 Subject: fixes #1619 expose expire threads tunables This change makes expire threads tunable follows the same strategy as taskq threads tunables. Add NNG_NUM_EXPIRE_THREADS to override the default behavior (`n_cpu` expire threads). The NNG_MAX_EXPIRE_THREADS limit is always applied if > 0, even if you specify the desired number of threads using NNG_NUM_EXPIRE_THREADS. NNG_EXPIRE_THREADS is not used anymore. This was only referenced in the code but never defined on CMake. The logic to cap expire threads between 1 and 256 was removed. If users set no limits, whatever value they choose will be used instead of being silently overridden by us. --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e8973244..04cc14de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,9 +132,7 @@ endif () # Expire threads. This runs the timeout handling, and having more of them # reduces contention on the common locks used for aio expiration. -# The default is to allocate up to max(8, ncpu). The upper limit can be -# overridden here. -set(NNG_MAX_EXPIRE_THREADS 8 CACHE STRING "Upper bound on expire threads, between 1...256") +set(NNG_MAX_EXPIRE_THREADS 8 CACHE STRING "Upper bound on expire threads, 0 for no limit") mark_as_advanced(NNG_MAX_EXPIRE_THREADS) if (NNG_MAX_EXPIRE_THREADS) add_definitions(-DNNG_MAX_EXPIRE_THREADS=${NNG_MAX_EXPIRE_THREADS}) -- cgit v1.2.3-70-g09d2