52 |
|
* maximumPoolSize (see {@link #getMaximumPoolSize}). |
53 |
|
* |
54 |
|
* When a new task is submitted in method {@link #execute(Runnable)}, |
55 |
< |
* and fewer than corePoolSize threads are running, a new thread is |
55 |
> |
* if fewer than corePoolSize threads are running, a new thread is |
56 |
|
* created to handle the request, even if other worker threads are |
57 |
< |
* idle. If there are more than corePoolSize but less than |
58 |
< |
* maximumPoolSize threads running, a new thread will be created only |
59 |
< |
* if the queue is full. By setting corePoolSize and maximumPoolSize |
60 |
< |
* the same, you create a fixed-size thread pool. By setting |
61 |
< |
* maximumPoolSize to an essentially unbounded value such as {@code |
62 |
< |
* Integer.MAX_VALUE}, you allow the pool to accommodate an arbitrary |
63 |
< |
* number of concurrent tasks. Most typically, core and maximum pool |
64 |
< |
* sizes are set only upon construction, but they may also be changed |
65 |
< |
* dynamically using {@link #setCorePoolSize} and {@link |
66 |
< |
* #setMaximumPoolSize}. </dd> |
57 |
> |
* idle. Else if fewer than maximumPoolSize threads are running, a |
58 |
> |
* new thread will be created to handle the request only if the queue |
59 |
> |
* is full. By setting corePoolSize and maximumPoolSize the same, you |
60 |
> |
* create a fixed-size thread pool. By setting maximumPoolSize to an |
61 |
> |
* essentially unbounded value such as {@code Integer.MAX_VALUE}, you |
62 |
> |
* allow the pool to accommodate an arbitrary number of concurrent |
63 |
> |
* tasks. Most typically, core and maximum pool sizes are set only |
64 |
> |
* upon construction, but they may also be changed dynamically using |
65 |
> |
* {@link #setCorePoolSize} and {@link #setMaximumPoolSize}. </dd> |
66 |
|
* |
67 |
|
* <dt>On-demand construction</dt> |
68 |
|
* |