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

Comparing jsr166/src/main/java/util/concurrent/ScheduledThreadPoolExecutor.java (file contents):
Revision 1.108 by jsr166, Tue Mar 28 23:09:10 2017 UTC vs.
Revision 1.109 by jsr166, Wed Mar 29 15:03:09 2017 UTC

# Line 50 | Line 50 | import java.util.concurrent.locks.Reentr
50   * <a href="package-summary.html#MemoryVisibility"><i>happen-before</i></a>
51   * those of subsequent ones.
52   *
53 < * <p>Calling {@link Future#get} on a periodic task's future will
54 < * never return normally.  If an execution of a periodic task
55 < * throws an exception, further executions are suppressed and
56 < * {@code get()} will throw an {@link ExecutionException} holding the
57 < * exception as its cause.  Otherwise, {@code get()} will block and
58 < * executions continue indefinitely until the task is cancelled, when
59 < * it will throw {@link CancellationException}.  Such cancellations
60 < * occur when the future is cancelled, on {@link #shutdownNow}, or on
61 < * {@link #shutdown} unless the {@linkplain
53 > * <p>Executions of a periodic task continue until one of the
54 > * following happens, when further executions are suppressed and the
55 > * task's future is completed:
56 > * <ul>
57 > * <li>{@link #shutdown} is called and the {@linkplain
58   * #getContinueExistingPeriodicTasksAfterShutdownPolicy policy on
59 < * whether to continue after shutdown} is set true.
59 > * whether to continue after shutdown} is not set true)
60 > * <li>{@link #shutdownNow} is called
61 > * <li>the task's future is {@linkplain Future#cancel cancelled}
62 > * <li>an execution of the task terminates abruptly with an exception;
63 > * in this case calling {@link Future#get()} will throw an {@link
64 > * ExecutionException} holding the exception as its cause.  In all
65 > * other cases {@code get()} will throw {@link CancellationException};
66 > * a periodic task's future never completes normally.
67 > * </ul>
68   *
69   * <p>While this class inherits from {@link ThreadPoolExecutor}, a few
70   * of the inherited tuning methods are not useful for it. In
# Line 674 | Line 678 | public class ScheduledThreadPoolExecutor
678       * <ul>
679       * <li>{@link #shutdownNow} is called
680       * <li>the policy is set to {@code false} when already shutdown
681 <     * <li>the task is {@linkplain Future#cancel cancelled}
681 >     * <li>the task's future is {@linkplain Future#cancel cancelled}
682       * <li>an execution of the task terminates with an exception
683       * </ul>
684       *
# Line 698 | Line 702 | public class ScheduledThreadPoolExecutor
702       * <ul>
703       * <li>{@link #shutdownNow} is called
704       * <li>the policy is set to {@code false} when already shutdown
705 <     * <li>the task is {@linkplain Future#cancel cancelled}
705 >     * <li>the task's future is {@linkplain Future#cancel cancelled}
706       * <li>an execution of the task terminates with an exception
707       * </ul>
708       *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines