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

Comparing jsr166/src/jsr166y/ForkJoinTask.java (file contents):
Revision 1.57 by dl, Sat Sep 4 11:33:53 2010 UTC vs.
Revision 1.58 by dl, Mon Sep 6 11:55:39 2010 UTC

# Line 621 | Line 621 | public abstract class ForkJoinTask<V> im
621  
622      /**
623       * Completes this task, and if not already aborted or cancelled,
624 <     * returning a {@code null} result upon {@code join} and related
625 <     * operations. This method may be used to provide results for
626 <     * asynchronous tasks, or to provide alternative handling for
627 <     * tasks that would not otherwise complete normally. Its use in
628 <     * other situations is discouraged. This method is
629 <     * overridable, but overridden versions must invoke {@code super}
630 <     * implementation to maintain guarantees.
624 >     * returning the given value as the result of subsequent
625 >     * invocations of {@code join} and related operations. This method
626 >     * may be used to provide results for asynchronous tasks, or to
627 >     * provide alternative handling for tasks that would not otherwise
628 >     * complete normally. Its use in other situations is
629 >     * discouraged. This method is overridable, but overridden
630 >     * versions must invoke {@code super} implementation to maintain
631 >     * guarantees.
632       *
633       * @param value the result value for this task
634       */
# Line 679 | Line 680 | public abstract class ForkJoinTask<V> im
680          boolean dec = false; // true if pool count decremented
681          long nanos = unit.toNanos(timeout);
682          for (;;) {
683 <            if (Thread.interrupted() && pool == null) {
683 >            if (pool == null && Thread.interrupted()) {
684                  interrupted = true;
685                  break;
686              }
# Line 764 | Line 765 | public abstract class ForkJoinTask<V> im
765      /**
766       * Commences performing this task and awaits its completion if
767       * necessary, without returning its result or throwing its
768 <     * exception. This method may be useful when processing
768 <     * collections of tasks when some have been cancelled or otherwise
769 <     * known to have aborted.
768 >     * exception.
769       */
770      public final void quietlyInvoke() {
771          if (status >= 0) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines