File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
src/main/java/com/algorithm/study/demo/concurrent Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 8282 - springboot启动机制。
8383 - [ Mybatis的底层实现原理。] ( https://mp.weixin.qq.com/s/AqqSRYPdUbruSAhhmqVneA )
8484 - [ 69道Spring面试题和答案] ( http://ifeve.com/spring-interview-questions-and-answers/ )
85+ - [ Spring 面试问题 TOP 50] ( https://mp.weixin.qq.com/s/eQ-lpYiW7a437djqliKhmg )
8586### 操作系统
8687
8788 - Linux系统下你关注过哪些内核参数,说说你知道的。
Original file line number Diff line number Diff line change 2626 * Created by liuxun on 2017/6/27.
2727 */
2828public class CyclicBarrierTest {
29- static CyclicBarrier c =new CyclicBarrier (3 );
29+ static CyclicBarrier c =new CyclicBarrier (3 ,()->{
30+ System .out .println ("Action...Go!" );
31+ });
3032 static ExecutorService executorService = Executors .newFixedThreadPool (2 );
3133 public static void main (String [] args ) {
3234 executorService .submit (new Runnable () {
Original file line number Diff line number Diff line change 55/**
66 * CountDownLatch允许一个或多个线程等待其他线程完成操作。
77 * CountDownLatch的构造函数接收一个int类型的参数作为计数器,如果你想等待N个点完成,这里就传入N。
8- * 当我们调用CountDownLatch的countDown方法时,N就会减1,CountDownLatch的a
8+ * 当我们调用CountDownLatch的countDown方法时,N就会减1,CountDownLatch的await
99 * 会阻塞当前线程,直到N变成零。由于countDown方法可以用在任何地方,所以这里说
1010 * 点,可以是N个线程,也可以是1个线程里的N个执行步骤。用在多个线程时,只需要把
1111 * CountDownLatch的引用传递到线程里即可。
You can’t perform that action at this time.
0 commit comments