Appendix. Rules of the Java Memory Model
Example of Synchronizes-With

JMM has the following rules:
- An unlock operation on a monitor Synchronizes-With later lock operations
- A write to a volatile variable Synchronizes-With later reads of the variable
- If an action A Synchronizes-With action B, then A Happens-Before B
- If A comes before B in program order within a thread, then A Happens-Before B
Read more in chapter 4.