Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florian Fischer
emper
Commits
0da9832c
Commit
0da9832c
authored
Apr 24, 2022
by
Florian Fischer
Browse files
make sleep semaphore threshold configurable for mazstab
parent
2ab1777a
Changes
3
Hide whitespace changes
Inline
Side-by-side
emper/sleep_strategy/SemaphoreWorkerSleepStrategy.hpp
View file @
0da9832c
...
...
@@ -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
;
...
...
meson.build
View file @
0da9832c
...
...
@@ -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'))
...
...
meson_options.txt
View file @
0da9832c
option(
'sleep_sem_threshold',
type: 'combo',
choices: ['0', 'workerCount'],
value: 'workerCount',
description: 'Threshold skipping the notification'
)
option(
'use_bundled_deps',
type: 'combo',
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment