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

[PipeSleepStrategy] fix notifyFromAnywhere

Don't decrease the sleeper count in the CAS loop further than
-count, which is the threshold we need to ensure that the notification
will be observed.
Decreasing it further than our threshold is not faulty it just results
in unnecessary skipped sleeps.

Don't call writeNotifications with a negative count.
Which will be interpreted as an unsigned value and thus results
in writing way to much hints to the pipe, jamming it.
If the original value before a successfully CAS is already negative
we called writeNotifications with this negative value.
This is fixed by using max(toWakeup, 0).
parent c58a9143
No related branches found
No related tags found
1 merge request!277[PipeSleepStrategy] fix notifyFromAnywhere
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment