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

Comparing jsr166/src/jsr166y/CountedCompleter.java (file contents):
Revision 1.22 by jsr166, Sun Nov 25 19:25:06 2012 UTC vs.
Revision 1.24 by jsr166, Mon Nov 26 05:46:55 2012 UTC

# Line 277 | Line 277 | package jsr166y;
277   *   }
278   *   public void onCompletion(CountedCompleter<?> caller) {
279   *     if (caller != this) {
280 < *      MapReducer<E> child = (MapReducer<E>)caller;
281 < *      MapReducer<E> sib = child.sibling;
282 < *      if (sib == null || sib.result == null)
283 < *        result = child.result;
284 < *      else
285 < *        result = reducer.apply(child.result, sib.result);
280 > *       MapReducer<E> child = (MapReducer<E>)caller;
281 > *       MapReducer<E> sib = child.sibling;
282 > *       if (sib == null || sib.result == null)
283 > *         result = child.result;
284 > *       else
285 > *         result = reducer.apply(child.result, sib.result);
286   *     }
287   *   }
288   *   public E getRawResult() { return result; }
# Line 388 | Line 388 | public abstract class CountedCompleter<T
388       * Creates a new CountedCompleter with the given completer
389       * and initial pending count.
390       *
391 <     * @param completer this tasks completer, or {@code null} if none
391 >     * @param completer this task's completer, or {@code null} if none
392       * @param initialPendingCount the initial pending count
393       */
394      protected CountedCompleter(CountedCompleter<?> completer,
# Line 401 | Line 401 | public abstract class CountedCompleter<T
401       * Creates a new CountedCompleter with the given completer
402       * and an initial pending count of zero.
403       *
404 <     * @param completer this tasks completer, or {@code null} if none
404 >     * @param completer this task's completer, or {@code null} if none
405       */
406      protected CountedCompleter(CountedCompleter<?> completer) {
407          this.completer = completer;
# Line 422 | Line 422 | public abstract class CountedCompleter<T
422  
423      /**
424       * Performs an action when method {@link #tryComplete} is invoked
425 <     * and there are no pending counts, or when the unconditional
425 >     * and the pending count is zero, or when the unconditional
426       * method {@link #complete} is invoked.  By default, this method
427       * does nothing. You can distinguish cases by checking the
428       * identity of the given caller argument. If not equal to {@code
# Line 450 | Line 450 | public abstract class CountedCompleter<T
450       * @param caller the task invoking this method (which may
451       * be this task itself).
452       * @return true if this exception should be propagated to this
453 <     * tasks completer, if one exists.
453 >     * task's completer, if one exists.
454       */
455      public boolean onExceptionalCompletion(Throwable ex, CountedCompleter<?> caller) {
456          return true;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines