Functional Programming in Java, Second Edition: p. 123: "crossing the memory barrier"

On page 123, in “Providing Thread Safety”, we read:

We averted the race condition, but the solution created another negative impact. Every call to the getHeavy() method now has to endure the synchronization overhead; the calling threads have to cross the memory barrier (see Brian Goetz’s Java Concurrency in Practice [Goe06]) even if there are no concurrently competing threads.

I suggest explicitly explaining what happens…

We averted the race condition, but the solution created another negative impact. Every call to the getHeavy() method now has to endure a synchronization overhead. The calling threads have to “cross the memory barrier”: among others, they issue special instructions to invalidate or flush memory caches to ensure every thread sees the latest version of any shared memory (see Brian Goetz’s Java Concurrency in Practice [Goe06]), even if there are no concurrently competing threads.