File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ pool-1-thread-1 End. Time = Tue Nov 12 20:59:54 CST 2019
339
339
340
340
现在,我们就分析上面的输出内容来简单分析一下线程池原理。
341
341
342
- ** 为了搞懂线程池的原理,我们需要首先分析一下 ` execute ` 方法。** 在 5 .1 节中的 Demo 中我们使用 ` executor.execute(worker) ` 来提交一个任务到线程池中去,这个方法非常重要,下面我们来看看它的源码:
342
+ ** 为了搞懂线程池的原理,我们需要首先分析一下 ` execute ` 方法。** 在 4 .1 节中的 Demo 中我们使用 ` executor.execute(worker) ` 来提交一个任务到线程池中去,这个方法非常重要,下面我们来看看它的源码:
343
343
344
344
``` java
345
345
// 存放线程池的运行状态 (runState) 和线程池内有效线程的数量 (workerCount)
@@ -388,7 +388,7 @@ pool-1-thread-1 End. Time = Tue Nov 12 20:59:54 CST 2019
388
388
389
389
![ 图解线程池实现原理] ( https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-7/图解线程池实现原理.png )
390
390
391
- 现在,让我们在回到 5 .1 节我们写的 Demo, 现在应该是不是很容易就可以搞懂它的原理了呢?
391
+ 现在,让我们在回到 4 .1 节我们写的 Demo, 现在应该是不是很容易就可以搞懂它的原理了呢?
392
392
393
393
没搞懂的话,也没关系,可以看看我的分析:
394
394
You can’t perform that action at this time.
0 commit comments