摘要: 概述 Condition接口位于java.util.concurrent.locks包下,实现类有 AbstractQueuedLongSynchronizer.ConditionObject和 AbstractQueuedSynchronizer.ConditionObject。Condition 阅读全文
posted @ 2022-03-18 17:48 甜菜波波 阅读(76) 评论(0) 推荐(0) 编辑
摘要: static void test3() throws InterruptedException{ Lock lock=new ReentrantLock(); Condition conditionLock1=lock.newCondition(); Condition conditionLock2 阅读全文
posted @ 2022-03-18 17:46 甜菜波波 阅读(53) 评论(0) 推荐(0) 编辑
摘要: Queue workQueue = corePoolSize <= 0 ? new SynchronousQueue() : new LinkedBlockingQueue(1024);ThreadFactory threadFactory = Executors.defaultThreadFact 阅读全文
posted @ 2022-03-18 15:39 甜菜波波 阅读(22) 评论(0) 推荐(0) 编辑