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.21 by jsr166, Sat Sep 4 00:21:31 2010 UTC vs.
Revision 1.22 by dl, Mon Sep 6 11:55:43 2010 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines