-
- Downloads
[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
Loading
Please register or sign in to comment