--- jsr166/src/jsr166y/ForkJoinTask.java 2010/09/04 11:33:53 1.57 +++ jsr166/src/jsr166y/ForkJoinTask.java 2010/09/07 23:17:10 1.60 @@ -153,7 +153,7 @@ public abstract class ForkJoinTask im * single int to minimize footprint and to ensure atomicity (via * CAS). Status is initially zero, and takes on nonnegative * values until completed, upon which status holds value - * NORMAL. CANCELLED, or EXCEPTIONAL. Tasks undergoing blocking + * NORMAL, CANCELLED, or EXCEPTIONAL. Tasks undergoing blocking * waits by other threads have the SIGNAL bit set. Completion of * a stolen task with SIGNAL set awakens any waiters via * notifyAll. Even though suboptimal for some purposes, we use @@ -206,7 +206,7 @@ public abstract class ForkJoinTask im /** * Records exception and sets exceptional completion. - * + * * @return status on exit */ private void setExceptionalCompletion(Throwable rex) { @@ -621,13 +621,14 @@ public abstract class ForkJoinTask im /** * Completes this task, and if not already aborted or cancelled, - * returning a {@code null} result upon {@code join} and related - * operations. This method may be used to provide results for - * asynchronous tasks, or to provide alternative handling for - * tasks that would not otherwise complete normally. Its use in - * other situations is discouraged. This method is - * overridable, but overridden versions must invoke {@code super} - * implementation to maintain guarantees. + * returning the given value as the result of subsequent + * invocations of {@code join} and related operations. This method + * may be used to provide results for asynchronous tasks, or to + * provide alternative handling for tasks that would not otherwise + * complete normally. Its use in other situations is + * discouraged. This method is overridable, but overridden + * versions must invoke {@code super} implementation to maintain + * guarantees. * * @param value the result value for this task */ @@ -679,7 +680,7 @@ public abstract class ForkJoinTask im boolean dec = false; // true if pool count decremented long nanos = unit.toNanos(timeout); for (;;) { - if (Thread.interrupted() && pool == null) { + if (pool == null && Thread.interrupted()) { interrupted = true; break; } @@ -764,9 +765,7 @@ public abstract class ForkJoinTask im /** * Commences performing this task and awaits its completion if * necessary, without returning its result or throwing its - * exception. This method may be useful when processing - * collections of tasks when some have been cancelled or otherwise - * known to have aborted. + * exception. */ public final void quietlyInvoke() { if (status >= 0) {