摘要:
超时中断;生产者/消费者队列 public class Demo09 implements Runnable { public static ReentrantLock lock = new ReentrantLock(); //锁 相当于一份公共资源 public static void main 阅读全文
摘要:
synchronized 对象锁:synchronized修饰普通方法或者synchronized(this) 如下: public class SynTest{ private synchronized void test1(){} private void test2(){ synchroniz 阅读全文