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.76 by jsr166, Tue Sep 7 07:24:39 2010 UTC vs.
Revision 1.77 by dl, Tue Sep 7 14:43:31 2010 UTC

# Line 6 | Line 6
6  
7   package jsr166y;
8  
9 import java.util.concurrent.*;
9   import java.util.ArrayList;
10   import java.util.Arrays;
11   import java.util.Collection;
# Line 429 | Line 428 | public class ForkJoinPool extends Abstra
428  
429      /**
430       * The wakeup interval (in nanoseconds) for the oldest worker
431 <     * waiting for an event invokes tryShutdownUnusedWorker to shrink
432 <     * the number of workers.  The exact value does not matter too
433 <     * much, but should be long enough to slowly release resources
434 <     * during long periods without use without disrupting normal use.
431 >     * waiting for an event to invoke tryShutdownUnusedWorker to
432 >     * shrink the number of workers.  The exact value does not matter
433 >     * too much. It must be short enough to release resources during
434 >     * sustained periods of idleness, but not so short that threads
435 >     * are continually re-created.
436       */
437      private static final long SHRINK_RATE_NANOS =
438          30L * 1000L * 1000L * 1000L; // 2 per minute
# Line 604 | Line 604 | public class ForkJoinPool extends Abstra
604       * (rarely) necessary when other count updates lag.
605       *
606       * @param dr -- either zero or ONE_RUNNING
607 <     * @param dt == either zero or ONE_TOTAL
607 >     * @param dt -- either zero or ONE_TOTAL
608       */
609      private void decrementWorkerCounts(int dr, int dt) {
610          for (;;) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines