摘要:
阅读全文
摘要:
线程池提供了一个线程队列,队列中保存着所有等待状态的线程.避免了频繁的创建和销毁线程池,提高了响应速度 java.util.concurrent.Executor: 负责线程池的使用和调度的根接口 | ExecutorService 子接口:线程池的主要接口 | ThredPoolExecutor 阅读全文
摘要:
synchronized 锁,对于非静态方法,默认为this,对于静态方法,默认为 该类的运行时类实例. class Number { public synchronized void getOne(){ System.out.println("one"); } public synchronize 阅读全文