O'Reilly logo
  • Cui Wen thinks this is interesting:

When the main thread writes first to number and then to ready without synchronization, the reader thread could see those writes happen in the opposite order—or not at all.


Cover of Java Concurrency in Practice


The order in which these two variables to be visible to the outside