摘要: 并发工具 闭锁 CountDownLatch 栅栏 CyclicBarrier 信号量 Semaphore API Example 并发有序执行三个任务 假设有3个任务,A,B,C,要求C执行时A,B已完成.A,B执行顺序无要求 并发执行2个任务的三个有序步骤 假设有2个任务A,B,每个任务都分三个 阅读全文
posted @ 2020-05-13 22:43 onion94 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 阻塞队列 BlockingQueue 阻塞队列操作方法概览 |Throws exception|Special value|Blocks|Times out | | | | | | Insert|add(e) |offer(e) |put(e) |offer(e, time, unit)| Remo 阅读全文
posted @ 2020-05-13 22:20 onion94 阅读(174) 评论(0) 推荐(0) 编辑