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.38 by dl, Tue Aug 4 22:47:08 2009 UTC vs.
Revision 1.40 by dl, Wed Aug 5 11:09:28 2009 UTC

# Line 560 | Line 560 | public abstract class ForkJoinTask<V> im
560      /**
561       * Forks the given tasks, returning when {@code isDone} holds for
562       * each task or an (unchecked) exception is encountered, in which
563 <     * case the exception is rethrown.  If more than one task
564 <     * encounters an exception, then this method throws any one of
565 <     * these exceptions.  The individual status of each task may be
563 >     * case the exception is rethrown.  If either task encounters an
564 >     * exception, the other one may be, but is not guaranteed to be,
565 >     * cancelled.  If both tasks throw an exception, then this method
566 >     * throws one of them.  The individual status of each task may be
567       * checked using {@link #getException()} and related methods.
568       *
569       * <p>This method may be invoked only from within {@code
# Line 725 | Line 726 | public abstract class ForkJoinTask<V> im
726          return (status & COMPLETION_MASK) == CANCELLED;
727      }
728  
728    /**
729     * Returns {@code true} if the computation performed by this task
730     * has completed (or has been cancelled).
731     *
732     * @return {@code true} if this computation has completed
733     */
729      public final boolean isDone() {
730          return status < 0;
731      }
732  
738    /**
739     * Returns {@code true} if this task was cancelled.
740     *
741     * @return {@code true} if this task was cancelled
742     */
733      public final boolean isCancelled() {
734          return (status & COMPLETION_MASK) == CANCELLED;
735      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines