Skip to content

[PipeSleepStrategy] prevent the still present race to cqes with the completer

Florian Fischer requested to merge aj46ezos/emper:fix-pipe-sleep-strategy into master

The previous race which I tried but in fact can not be fixed alone with the waitInflight flag is now described in the code comment in PipeSleepStrategy::sleep().

To completely prevent the completer and the worker racing to the new work notifications cqes we repurpose the cq_lock to ensure the completer is always observing and honoring the waitInflight flag.

Also add an onNewWorkNotification callback to keep most sleep related code and logic in PipeSleepStrategy.

Edited by Florian Fischer

Merge request reports