CountDownLatch CountDownLatch适用于在多线程的场景需要等待所有子线程全部执行完毕之后再做操作的场景. 举个例子,早上部门开会,有人在上厕所,这时候需要等待所有人从厕所回来之后才能开始会议. public class CountDownLatchTest { private static int num = 3; private static CountDownLatch countDownLatch = new CountDownLatch(num); private…