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.157 by jsr166, Wed Dec 31 07:54:14 2014 UTC vs.
Revision 1.158 by dl, Fri Jan 30 12:49:21 2015 UTC

# Line 221 | Line 221 | import java.util.concurrent.locks.Reentr
221   * any special processing that needs to be done once the Executor has
222   * fully terminated.
223   *
224 < * <p>If hook or callback methods throw exceptions, internal worker
225 < * threads may in turn fail and abruptly terminate.</dd>
224 > * <p>If hook, callback, or BlockingQueue methods throw exceptions,
225 > * internal worker threads may in turn fail, abruptly terminate, and
226 > * possibly be replaced.</dd>
227   *
228   * <dt>Queue maintenance</dt>
229   *
# Line 1951 | Line 1952 | public class ThreadPoolExecutor extends
1952       *   // ...
1953       *   protected void afterExecute(Runnable r, Throwable t) {
1954       *     super.afterExecute(r, t);
1955 <     *     if (t == null && r instanceof Future<?>) {
1955 >     *     if (t == null && r instanceof Future<?> && ((Future<?>)r).isDone()) {
1956       *       try {
1957       *         Object result = ((Future<?>) r).get();
1958       *       } catch (CancellationException ce) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines