看了一本书说是 java CAS 不保证线程可见性,用代码怎么证明出来? 下面我写的代码,运行一直正确,还是我写的不能证明CAS不保证线程可见性 import sun.misc.Unsafe; import java.lang.reflect.Field; public class UnsafeTest { Unsafe unsafe = null; static UnsafeTest test = new UnsafeTest(); public UnsafeTest() { Field f = null; try...