Skip to content

[WakeupStrategy] fix the throttle algorithm for notifiaction from anywhere

Florian Fischer requested to merge aj46ezos/emper:fix-throttle-wakeup into master

The throttle algorithm had the same problem like our sleep algorithms where notifications from anywhere race with a worker going to sleep resulting in lost wakeups. In our sleep strategies we prevent those races by preventing sleep attempts when notifying 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.

Fixes #26 (closed).

Edited by Florian Fischer

Merge request reports