Skip to content
Snippets Groups Projects
Commit 0da9832c authored by Florian Fischer's avatar Florian Fischer
Browse files

make sleep semaphore threshold configurable for mazstab

parent 2ab1777a
No related branches found
No related tags found
No related merge requests found
......@@ -160,7 +160,12 @@ class AbstractSemaphoreWorkerSleepStrategy
* reviewed and potentially changed to '-1'.
* skipWakeupThreshold = 0;
*/
const typename Sem::CounterType skipWakeupThreshold = workerCount;
typename Sem::CounterType skipWakeupThreshold;
if constexpr (callerEnvironment == CallerEnvironment::ANYWHERE) {
skipWakeupThreshold = workerCount;
} else {
skipWakeupThreshold = EMPER_SLEEP_SEM_THRESHOLD;
}
auto semValue = wakeupSem.getValue();
return semValue <= skipWakeupThreshold;
......
......@@ -89,6 +89,7 @@ else
endif
conf_data.set('EMPER_SLEEP_SEM_THRESHOLD', get_option('sleep_sem_threshold'))
conf_data.set('EMPER_WORKER_SLEEP', get_option('worker_sleep'))
conf_data.set('EMPER_WORKER_WAKEUP_STRATEGY', get_option('worker_wakeup_strategy'))
conf_data.set('EMPER_WORKER_IGNORE_WAKEUP_HINT', get_option('worker_ignore_wakeup_hint'))
......
option(
'sleep_sem_threshold',
type: 'combo',
choices: ['0', 'workerCount'],
value: 'workerCount',
description: 'Threshold skipping the notification'
)
option(
'use_bundled_deps',
type: 'combo',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment