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.369 by dl, Mon Feb 3 13:54:54 2020 UTC vs.
Revision 1.370 by dl, Mon Feb 3 21:07:49 2020 UTC

# Line 1608 | Line 1608 | public class ForkJoinPool extends Abstra
1608                  if ((q = qs[i]) != null && (a = q.array) != null &&
1609                      (cap = a.length) > 0 && a[(cap - 1) & q.base] != null) {
1610                      if (ctl == c && compareAndSetCtl(c, prevCtl))
1611 <                        w.phase = phase;     // self-signal
1611 >                        w.phase &= ~UNSIGNALLED; // self-signal
1612                      break;
1613                  }
1614              }
# Line 1616 | Line 1616 | public class ForkJoinPool extends Abstra
1616          for (;;) {                           // await activation or termination
1617              if ((md = mode) < 0)
1618                  return -1;
1619 <            else if (w.phase >= 0)
1620 <                break;
1619 >            else if (w.phase >= 0) {
1620 >                LockSupport.setCurrentBlocker(null);
1621 >                return 0;
1622 >            }
1623              else if ((int)(ctl >> RC_SHIFT) > ac)
1624                  Thread.onSpinWait();         // signal in progress
1625              else if (rc <= 0 && (md & SHUTDOWN) != 0 &&
# Line 1638 | Line 1640 | public class ForkJoinPool extends Abstra
1640                  }
1641              }
1642          }
1641        LockSupport.setCurrentBlocker(null);
1642        return 0;
1643      }
1644  
1645      // Utilities used by ForkJoinTask

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines