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

Comparing jsr166/src/main/java/util/concurrent/ForkJoinTask.java (file contents):
Revision 1.129 by dl, Sun Feb 2 23:44:12 2020 UTC vs.
Revision 1.130 by dl, Mon Feb 3 21:07:49 2020 UTC

# Line 111 | Line 111 | import java.util.concurrent.locks.LockSu
111   * #getException} will return either the encountered exception or
112   * {@link CancellationException}.
113   *
114 + * <p>By default, method {@link #cancel} ignores its {@code
115 + * mayInterruptIfRunning} argument, to separate task cancellation from
116 + * thread status. However, the method is overridable.  An adaptor
117 + * (@link #adaptInterruptible) for Callables does so by tracking and
118 + * interrupting the running thread upon {@code cancel(true)}. Usage
119 + * requires care.  A late interrupt issued by another thread after the
120 + * task has completed may (inadvertently) interrupt some future task.
121 + * When using interruptible tasks, method bodies of all task code
122 + * should ignore stray interrupts. When applicable, {@code
123 + * isCancelled} or {@code isDone} can be used to distinguish cases.
124 + *
125   * <p>The ForkJoinTask class is not usually directly subclassed.
126   * Instead, you subclass one of the abstract classes that support a
127   * particular style of fork/join processing, typically {@link

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines