--- jsr166/src/jsr166y/CountedCompleter.java 2012/11/25 21:04:43 1.23 +++ jsr166/src/jsr166y/CountedCompleter.java 2012/12/15 21:26:06 1.28 @@ -15,11 +15,11 @@ package jsr166y; * CountedCompleter are similar to those of other completion based * components (such as {@link java.nio.channels.CompletionHandler}) * except that multiple pending completions may be necessary - * to trigger the {@link #onCompletion} action, not just one. Unless - * initialized otherwise, the {@link #getPendingCount pending count} - * starts at zero, but may be (atomically) changed using methods - * {@link #setPendingCount}, {@link #addToPendingCount}, and {@link - * #compareAndSetPendingCount}. Upon invocation of {@link + * to trigger the completion action {@link #onCompletion}, not just one. + * Unless initialized otherwise, the {@linkplain #getPendingCount pending + * count} starts at zero, but may be (atomically) changed using + * methods {@link #setPendingCount}, {@link #addToPendingCount}, and + * {@link #compareAndSetPendingCount}. Upon invocation of {@link * #tryComplete}, if the pending action count is nonzero, it is * decremented; otherwise, the completion action is performed, and if * this completer itself has a completer, the process is continued @@ -83,7 +83,7 @@ package jsr166y; * subdivided) to each element of an array or collection; especially * when the operation takes a significantly different amount of time * to complete for some elements than others, either because of - * intrinsic variation (for example IO) or auxiliary effects such as + * intrinsic variation (for example I/O) or auxiliary effects such as * garbage collection. Because CountedCompleters provide their own * continuations, other threads need not block waiting to perform * them. @@ -183,12 +183,13 @@ package jsr166y; * *
Searching. A tree of CountedCompleters can search for a
* value or property in different parts of a data structure, and
- * report a result in an {@link java.util.concurrent.AtomicReference}
- * as soon as one is found. The others can poll the result to avoid
- * unnecessary work. (You could additionally {@link #cancel} other
- * tasks, but it is usually simpler and more efficient to just let
- * them notice that the result is set and if so skip further
- * processing.) Illustrating again with an array using full
+ * report a result in an {@link
+ * java.util.concurrent.atomic.AtomicReference AtomicReference} as
+ * soon as one is found. The others can poll the result to avoid
+ * unnecessary work. (You could additionally {@linkplain #cancel
+ * cancel} other tasks, but it is usually simpler and more efficient
+ * to just let them notice that the result is set and if so skip
+ * further processing.) Illustrating again with an array using full
* partitioning (again, in practice, leaf tasks will almost always
* process more than one element):
*
@@ -223,7 +224,7 @@ package jsr166y;
* public static