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

Comparing jsr166/src/main/java/util/concurrent/ForkJoinPool.java (file contents):
Revision 1.280 by dl, Sat Sep 26 15:30:15 2015 UTC vs.
Revision 1.281 by dl, Sat Sep 26 19:11:35 2015 UTC

# Line 1631 | Line 1631 | public class ForkJoinPool extends Abstra
1631                                                 (SP_MASK & c))));
1632          }
1633          if (w != null) {
1634 +            w.currentSteal = null;
1635              w.qlock = -1;                             // ensure set
1636              w.cancelAll();                            // cancel remaining tasks
1637          }
# Line 2404 | Line 2405 | public class ForkJoinPool extends Abstra
2405                          break;                    // check queues
2406                      for (int i = 0; i <= m; ++i) {
2407                          if ((w = ws[i]) != null) {
2408 <                            if ((b = w.base) != w.top ||
2408 >                            if (((b = w.base) != w.top && !w.isEmpty()) ||
2409                                  w.currentSteal != null) {
2410 <                                while ((sp = (int)(c = ctl)) != 0 &&
2411 <                                       !tryRelease(c, ws[m & sp], AC_UNIT))
2412 <                                    ;
2413 <                                return false;     // arrange for recheck
2410 >                                if ((sp = (int)(c = ctl)) == 0 ||
2411 >                                    tryRelease(c, ws[m & sp], AC_UNIT))
2412 >                                    return false; // arrange for recheck
2413 >                                oldSum = 0L;      // rescan
2414                              }
2415                              checkSum += b;
2416                              if ((i & 1) == 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines