![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线程
simon_it
我就是这么菜
展开
-
对Executors.newFixedThreadPool,CountDownLatch的个人初步了解
Executors.newFixedThreadPool ExecutorService是Executor直接的扩展接口,也是最常用的线程池接口,我们通常见到的线程池定时任务线程池都是它的实现类。 Executors.newFixedThreadPool一个固定大小的线程池 Executors.newFixedThreadPool(4)好比如一个车间里面只能允许4个人的容量,然后4个人一起工...原创 2018-08-30 15:46:30 · 1850 阅读 · 0 评论 -
Runnable,Thread.run,wait,notify
线程同时存在Runable和Thread的run方法先执行哪一个?先看源码 /** * If this thread was constructed using a separate * <code>Runnable</code> run object, then that * <code>Runnable</co...原创 2018-09-19 18:31:33 · 676 阅读 · 0 评论