[concurrency-interest] ReentrantReadWriteLock sample usage - redundant volatile

Roman Leventov leventov.ru at gmail.com
Mon Dec 12 15:55:32 EST 2016

It seems that in "CachedData" sample usage in ReentrantReadWriteLock
class-level Javadoc comment volatile on cacheValid field is redundant,
because cacheValid is only accessed when readLock or writeLock is held,
that should guarantee total memory safety.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20161212/98e1282e/attachment.html>

More information about the Concurrency-interest mailing list