1L4Linux 54 天前 via Android
println 的 synchronized 只保证输出的原子性吧，管得着方法外的变量吗？你不妨举例说说其它 threads 有怎样的代码。
Concurrent Programming in Java 里说了啊
In essence, releasing a lock forces a flush of all writes from working memory employed by the thread, and acquiring a lock forces a (re)load of the values of accessible fields. While lock actions provide exclusion only for the operations performed within a synchronized method or block, these memory effects are defined to cover all fields used by the thread performing the action.
是当前作用域的所有变量都 reload from memory