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

Comparing jsr166/src/main/java/util/concurrent/CountedCompleter.java (file contents):
Revision 1.46 by jsr166, Mon Dec 9 17:00:23 2013 UTC vs.
Revision 1.47 by jsr166, Fri May 30 16:10:11 2014 UTC

# Line 206 | Line 206 | package java.util.concurrent;
206   *   }
207   *   public E getRawResult() { return result.get(); }
208   *   public void compute() { // similar to ForEach version 3
209 < *     int l = lo,  h = hi;
209 > *     int l = lo, h = hi;
210   *     while (result.get() == null && h >= l) {
211   *       if (h - l >= 2) {
212   *         int mid = (l + h) >>> 1;
# Line 336 | Line 336 | package java.util.concurrent;
336   *     this.next = next;
337   *   }
338   *   public void compute() {
339 < *     int l = lo,  h = hi;
339 > *     int l = lo, h = hi;
340   *     while (h - l >= 2) {
341   *       int mid = (l + h) >>> 1;
342   *       addToPendingCount(1);
# Line 347 | Line 347 | package java.util.concurrent;
347   *       result = mapper.apply(array[l]);
348   *     // process completions by reducing along and advancing subtask links
349   *     for (CountedCompleter<?> c = firstComplete(); c != null; c = c.nextComplete()) {
350 < *       for (MapReducer t = (MapReducer)c, s = t.forks;  s != null; s = t.forks = s.next)
350 > *       for (MapReducer t = (MapReducer)c, s = t.forks; s != null; s = t.forks = s.next)
351   *         t.result = reducer.apply(t.result, s.result);
352   *     }
353   *   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines