363 |
|
/** |
364 |
|
* The queue used for holding tasks and handing off to worker |
365 |
|
* threads. We do not require that workQueue.poll() returning |
366 |
< |
* null to necessarily mean that workQueue.isEmpty(), so rely |
366 |
> |
* null necessarily means that workQueue.isEmpty(), so rely |
367 |
|
* solely on isEmpty to see if the queue is empty (which we must |
368 |
|
* do for example when deciding whether to transition from |
369 |
|
* SHUTDOWN to TERMINATED). This accommodates special-purpose |
455 |
|
/** |
456 |
|
* Core pool size is the minimum number of workers to keep alive |
457 |
|
* (and not allow to time out etc) unless allowCoreThreadTimeOut |
458 |
< |
* is set, in which case the mininum is zero. |
458 |
> |
* is set, in which case the minimum is zero. |
459 |
|
*/ |
460 |
|
private volatile int corePoolSize; |
461 |
|
|
796 |
|
|
797 |
|
Worker w = new Worker(firstTask); |
798 |
|
Thread t = w.thread; |
799 |
< |
if (t == null) { // Back out on Threadfactory failure |
799 |
> |
if (t == null) { // Back out on ThreadFactory failure |
800 |
|
decrementWorkerCount(); |
801 |
|
tryTerminate(); |
802 |
|
return false; |