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.347 by jsr166, Sun Mar 11 18:00:06 2018 UTC vs.
Revision 1.348 by dl, Tue Apr 3 11:11:04 2018 UTC

# Line 2031 | Line 2031 | public class ForkJoinPool extends Abstra
2031                      if ((md & SMASK) + (int)(checkSum >> RC_SHIFT) > 0)
2032                          running = true;
2033                      else if (ws != null) {
2034 <                        WorkQueue w; int b;
2034 >                        WorkQueue w;
2035                          for (int i = 0; i < ws.length; ++i) {
2036                              if ((w = ws[i]) != null) {
2037 <                                checkSum += (b = w.base) + w.id;
2037 >                                int s = w.source, p = w.phase;
2038 >                                int d = w.id, b = w.base;
2039                                  if (b != w.top ||
2040 <                                    ((i & 1) == 1 && w.source >= 0)) {
2040 >                                    ((d & 1) == 1 && (s >= 0 || p >= 0))) {
2041                                      running = true;
2042 <                                    break;
2042 >                                    break;     // working, scanning, or have work
2043                                  }
2044 +                                checkSum += (((long)s << 48) + ((long)p << 32) +
2045 +                                             ((long)b << 16) + (long)d);
2046                              }
2047                          }
2048                      }
# Line 2070 | Line 2073 | public class ForkJoinPool extends Abstra
2073                                  } catch (Throwable ignore) {
2074                                  }
2075                              }
2076 <                            checkSum += w.base + w.phase;
2076 >                            checkSum += ((long)w.phase << 32) + w.base;
2077                          }
2078                      }
2079                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines