In this article, I would like to share a different approach on this subject that maybe is helpful for you, and also to talk about some particularities and misconceptions about
_volatile_
. There`s very good material on this topic out there (like “Java Concurrency In Practice” [JCIP])
I encourage you to read it ;)
We will be talking about the semantics of
_volatile_
as defined from Java 5 onwards (on previous Java versions,_volatile_
has no memory-consistency/state-visibility semantic).
#java #java-concurrency #volatile #programming #coding #code-reordering #synchronization #oracle