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

[WakeupStrategy] fix the throttle algorithm for notifiaction from anywhere

The throttle algorithm had the same problem like our sleep algorithms
where notifications from anywhere may race with a worker going to
sleep resulting in lost wakeups.
In the sleep strategy we prevent those races by preventing sleep attempts
when notifing from anywhere.
The throttle algorithm also does now exactly this. A notifier from anywhere
will now always set the WakeupStrategy state to notified.
If the state was previously pending this new approach does not differ from
the previous behavior and a sleeping worker will be notified.
If the state was waking the waking worker skips its sleep if it observes
the WakeupStrategy state as notified.
parent 7ae0f69b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment