mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
勘误
This commit is contained in:
parent
9b3594f731
commit
da754ac304
@ -333,7 +333,7 @@ pool-1-thread-2 End. Time = Sun Apr 12 11:14:47 CST 2020
|
|||||||
c = ctl.get();
|
c = ctl.get();
|
||||||
}
|
}
|
||||||
// 2.如果当前之行的任务数量大于等于 corePoolSize 的时候就会走到这里
|
// 2.如果当前之行的任务数量大于等于 corePoolSize 的时候就会走到这里
|
||||||
// 通过 isRunning 方法判断线程池状态,线程池处于 RUNNING 状态才会被并且队列可以加入任务,该任务才会被加入进去
|
// 通过 isRunning 方法判断线程池状态,线程池处于 RUNNING 状态并且队列可以加入任务,该任务才会被加入进去
|
||||||
if (isRunning(c) && workQueue.offer(command)) {
|
if (isRunning(c) && workQueue.offer(command)) {
|
||||||
int recheck = ctl.get();
|
int recheck = ctl.get();
|
||||||
// 再次获取线程池状态,如果线程池状态不是 RUNNING 状态就需要从任务队列中移除任务,并尝试判断线程是否全部执行完毕。同时执行拒绝策略。
|
// 再次获取线程池状态,如果线程池状态不是 RUNNING 状态就需要从任务队列中移除任务,并尝试判断线程是否全部执行完毕。同时执行拒绝策略。
|
||||||
|
Loading…
x
Reference in New Issue
Block a user