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

Comparing jsr166/src/jsr166y/ForkJoinPool.java (file contents):
Revision 1.128 by dl, Mon Apr 9 13:11:44 2012 UTC vs.
Revision 1.131 by jsr166, Tue Aug 14 06:00:55 2012 UTC

# Line 1047 | Line 1047 | public class ForkJoinPool extends Abstra
1047              ASHIFT = 31 - Integer.numberOfLeadingZeros(s);
1048          }
1049      }
1050 +
1051      /**
1052       * Per-thread records for threads that submit to pools. Currently
1053       * holds only pseudo-random seed / index that is used to choose
# Line 1103 | Line 1104 | public class ForkJoinPool extends Abstra
1104      private static final RuntimePermission modifyThreadPermission;
1105  
1106      /**
1107 <     * Per-thread submission bookeeping. Shared across all pools
1107 >     * Per-thread submission bookkeeping. Shared across all pools
1108       * to reduce ThreadLocal pollution and because random motion
1109       * to avoid contention in one pool is likely to hold for others.
1110       */
# Line 1535 | Line 1536 | public class ForkJoinPool extends Abstra
1536                      t = (ForkJoinTask<?>)U.getObjectVolatile(a, i);
1537                      if (q.base == b && ec >= 0 && t != null &&
1538                          U.compareAndSwapObject(a, i, t, null)) {
1539 <                        q.base = b + 1;       // specialization of pollAt
1539 >                        if (q.top - (q.base = b + 1) > 1)
1540 >                            signalWork();    // help pushes signal
1541                          return t;
1542                      }
1543                      else if (ec < 0 || j <= m) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines