一.指令重排序 例子如下: public class Visibility1 { public static boolean ready; public static int number; } public class ReaderThread extends Thread { @Override public void run() { while (!Visibility1.ready){ Thread.yield(); System.out.println(Visibility1.numb…