👇👇关注后回复 “进群” ,拉你进程序员交流群👇👇作者丨彼岸舞https://www.cnblogs.com/flower-dance/p/13714006.html什么是JUC?JUC就是java.util.concurrent包,这个包俗称JUC,里面都是解决并发问题的一些东西该包的位置位于java下面的rt.jar包下面4大常用并发工具类:CountDownLatchCyclicBarrierSemaphoreExChangerCountDownLatch:CountDownLatch,俗称闭锁,作用是类似加强版的Join,是让一组线程等待其他的线程完成工作以后才执行就比如在启动框架服务的时候,我们主线程需要在环境线程初始化完成之后才能启动,这时候我们就可以实现使用CountDownLatch来完成/** * Constructs a {@code CountDownLatch} initialized with the given count. * * @param count the number of times {@link #countDown} must be invoked * before threads can pass through {@link #await} * @throws IllegalArgumentException if {@code count}
………………………………