Concurrency
This lesson lists gotchas of Java concurrency.
We'll cover the following...
Notes on Concurrency
Synchronizing only the write path isn't sufficient for thread-safety. In fact, synchronization has no effect unless both read and write operations are synchronized. The class below shows such a scenario, where the read path isn't synchronized and a thead may never see the updated value of the flag set by another ...