ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java (file contents):
Revision 1.168 by jsr166, Sun Feb 19 00:31:33 2017 UTC vs.
Revision 1.169 by jsr166, Sun Feb 19 00:40:50 2017 UTC

# Line 52 | Line 52 | import java.util.concurrent.locks.Reentr
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   *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines