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

do not notify workers about termination if they do not sleep

I stumbled upon this because the no-sleep variants in the pulse evaluation
showed notifications in their stats.
parent 3e01afe3
No related branches found
No related tags found
No related merge requests found
......@@ -442,7 +442,9 @@ auto Runtime::nextFiber() -> std::optional<NextFiberResult> {
void Runtime::initiateTermination() {
terminateWorkers.store(true, std::memory_order_release);
workerSleepStrategy.notifyAll<CallerEnvironment::ANYWHERE>();
if constexpr (emper::WORKER_SLEEP) {
workerSleepStrategy.notifyAll<CallerEnvironment::ANYWHERE>();
}
if constexpr (USE_IO_COMPLETER) {
globalIo->initiateTermination();
......
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