yield示例分析 public class TestYield { private static final Object lock = new Object(); public static void main(String[] args) { YieldThread t1 = new YieldThread(); YieldThread t2 = new YieldThread(); t1.start(); t2.start(); /** * t1得到cpu执行权后,执行run时,获取到l…