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

Comparing jsr166/src/jsr166e/RecursiveAction.java (file contents):
Revision 1.1 by dl, Mon Aug 13 15:52:33 2012 UTC vs.
Revision 1.2 by jsr166, Sun Nov 25 21:21:11 2012 UTC

# Line 111 | Line 111 | package jsr166e;
111   *     int h = hi;
112   *     Applyer right = null;
113   *     while (h - l > 1 && getSurplusQueuedTaskCount() <= 3) {
114 < *        int mid = (l + h) >>> 1;
115 < *        right = new Applyer(array, mid, h, right);
116 < *        right.fork();
117 < *        h = mid;
114 > *       int mid = (l + h) >>> 1;
115 > *       right = new Applyer(array, mid, h, right);
116 > *       right.fork();
117 > *       h = mid;
118   *     }
119   *     double sum = atLeaf(l, h);
120   *     while (right != null) {
121 < *        if (right.tryUnfork()) // directly calculate if not stolen
122 < *          sum += right.atLeaf(right.lo, right.hi);
121 > *       if (right.tryUnfork()) // directly calculate if not stolen
122 > *         sum += right.atLeaf(right.lo, right.hi);
123   *       else {
124 < *          right.join();
125 < *          sum += right.result;
126 < *        }
127 < *        right = right.next;
128 < *      }
124 > *         right.join();
125 > *         sum += right.result;
126 > *       }
127 > *       right = right.next;
128 > *     }
129   *     result = sum;
130   *   }
131   * }}</pre>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines