You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 17, 2020. It is now read-only.
The method SingleConsumerQueue.LinearizableNode.await() seems to do nothing useful.
Analysis discovers that void method SingleConsumerQueue.LinearizableNode.await() has non-trivial body, yet does nothing useful. Probably there's some mistake.
This is a spin loop watching a volatile field. This would be true if the field was non-volatile, as the JVM could optimize it away as dead code. The volatile introduces a load barrier so that the signal is observed.
volatilebooleandone;
voidawait() {
while (!done) {}
}
The text was updated successfully, but these errors were encountered:
I can exclude volatile read from operations w/o side-effect, but spin-loop is usually a bad practice. There are better concurrency primitives which will not burn your CPU uselessly...
This is a spin loop watching a volatile field. This would be true if the field was non-volatile, as the JVM could optimize it away as dead code. The volatile introduces a load barrier so that the signal is observed.
The text was updated successfully, but these errors were encountered: