In this age when parallelism matters, being able to write proper concurrent code is paramount. While Java hides lots of implementation details by its ‘Write Once, Run Anywhere’ motto, all abstractions will eventually leak. When they do, you will have to go deeper and see how that thing actually works.
In this talk, we will dive into the HotSpot sources and beyond to realize why JMM is the way it is and how to wield it for greater results. We shall take a simple piece of multi-threaded code, and go all the way down to the level of CPU instructions to see what really happens.