多线程并发测试

第一步:
实现runnable类 run方法

 
第二步:
创建多线程池执行

ExecutorService service = Executors.newFixedThreadPool(threadNums);


final CountDownLatch startGate = new CountDownLatch(1);


final CountDownLatch endGate = new CountDownLatch(threadNums);

 

 

posted on 2019-05-16 17:58  雨燕赵  阅读(544)  评论(0编辑  收藏  举报