synchronized关键字的内存语义及实现
2020-09-05
阅读 11 分钟
1.6kSynchronization has several aspects. The most well-understood is mutual exclusion -- only one thread can hold a monitor at once, so synchronizing on a monitor means that once one thread enters a synchronized block protected by a monitor, no other thread can enter a block protected by that monitor...