Behavior of memory barrier in Java
问题 After reading more blogs/articles etc, I am now really confused about the behavior of load/store before/after memory barrier. Following are 2 quotes from Doug Lea in one of his clarification article about JMM, which are both very straighforward: Anything that was visible to thread A when it writes to volatile field f becomes visible to thread B when it reads f. Note that it is important for both threads to access the same volatile variable in order to properly set up the happens-before