Reading \"Java Concurrency In Practice\", there\'s this part in section 3.5:
public Holder holder;
public void initialize() {
holder = new Holder(42);
}
The basic issue is that without proper synchronization, how writes to memory may manifest in different threads. The classic example:
a = 1;
b = 2;
If you do that on one thread, a second thread may see b set to 2 before a is set to 1. Furthermore, it's possible for there to be an unbounded amount of time between a second thread seeing one of those variables get updated and the other variable being updated.