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.183 by jsr166, Tue Feb 5 19:54:07 2013 UTC vs.
Revision 1.188 by jsr166, Mon Jul 27 03:12:26 2015 UTC

# Line 687 | Line 687 | public class ForkJoinPool extends Abstra
687              return (n >= 0) ? 0 : -n; // ignore transient negative
688          }
689  
690 <       /**
690 >        /**
691           * Provides a more accurate estimate of whether this queue has
692           * any tasks than does queueSize, by checking whether a
693           * near-empty queue has at least one unclaimed task.
# Line 725 | Line 725 | public class ForkJoinPool extends Abstra
725              }
726          }
727  
728 <       /**
728 >        /**
729           * Initializes or doubles the capacity of array. Call either
730           * by owner or with lock held -- it is OK for base, but not
731           * top, to move while resizings are in progress.
# Line 1131 | Line 1131 | public class ForkJoinPool extends Abstra
1131       */
1132      private static final int SEED_INCREMENT = 0x61c88647;
1133  
1134 <    /**
1134 >    /*
1135       * Bits and masks for control variables
1136       *
1137       * Field ctl is a long packed with:
# Line 2127 | Line 2127 | public class ForkJoinPool extends Abstra
2127                      w.runSubtask(t);
2128                  }
2129              }
2130 <            else if (active) {       // decrement active count without queuing
2130 >            else if (active) {      // decrement active count without queuing
2131                  long nc = (c = ctl) - AC_UNIT;
2132                  if ((int)(nc >> AC_SHIFT) + (config & SMASK) == 0)
2133 <                    return;          // bypass decrement-then-increment
2133 >                    return;         // bypass decrement-then-increment
2134                  if (U.compareAndSwapLong(this, CTL, c, nc))
2135                      active = false;
2136              }
# Line 2185 | Line 2185 | public class ForkJoinPool extends Abstra
2185       * producing extra tasks amortizes the uncertainty of progress and
2186       * diffusion assumptions.
2187       *
2188 <     * So, users will want to use values larger, but not much larger
2188 >     * So, users will want to use values larger (but not much larger)
2189       * than 1 to both smooth over transient shortages and hedge
2190       * against uneven progress; as traded off against the cost of
2191       * extra task overhead. We leave the user to pick a threshold

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines