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.140 by dl, Wed Nov 14 17:20:37 2012 UTC vs.
Revision 1.144 by jsr166, Sun Nov 18 18:03:10 2012 UTC

# Line 62 | Line 62 | import java.util.concurrent.TimeUnit;
62   * {@link #toString} returns indications of pool state in a
63   * convenient form for informal monitoring.
64   *
65 < * <p> As is the case with other ExecutorServices, there are three
65 > * <p>As is the case with other ExecutorServices, there are three
66   * main task execution methods summarized in the following table.
67   * These are designed to be used primarily by clients not already
68   * engaged in fork/join computations in the current pool.  The main
# Line 104 | Line 104 | import java.util.concurrent.TimeUnit;
104   * an integer greater than zero, {@code threadFactory} -- the class
105   * name of a {@link ForkJoinWorkerThreadFactory}, and {@code
106   * exceptionHandler} -- the class name of a {@link
107 + * java.lang.Thread.UncaughtExceptionHandler
108   * Thread.UncaughtExceptionHandler}. Upon any error in establishing
109   * these settings, default parameters are used.
110   *
# Line 448 | Line 449 | public class ForkJoinPool extends Abstra
449       * perform some subtask processing (see externalHelpJoin and
450       * related methods).  We do not need to record whether these
451       * submissions are to the common pool -- if not, externalHelpJoin
452 <     * returns quicky (at the most helping to signal some common pool
452 >     * returns quickly (at the most helping to signal some common pool
453       * workers). These submitters would otherwise be blocked waiting
454       * for completion, so the extra effort (with liberally sprinkled
455       * task status checks) in inapplicable cases amounts to an odd
# Line 653 | Line 654 | public class ForkJoinPool extends Abstra
654  
655          /**
656           * Pushes a task. Call only by owner in unshared queues.
657 <         * Cases needing resizing or rejection are relyaed to fullPush
657 >         * Cases needing resizing or rejection are relayed to fullPush
658           * (that also handles shared queues).
659           *
660           * @param task the task. Caller must ensure non-null.
# Line 1290 | Line 1291 | public class ForkJoinPool extends Abstra
1291                      --spins;
1292              }
1293              else if (U.compareAndSwapInt(this, PLOCK, ps, ps | PL_SIGNAL)) {
1294 <                synchronized(this) {
1294 >                synchronized (this) {
1295                      if ((plock & PL_SIGNAL) != 0) {
1296                          try {
1297                              wait();
# Line 1314 | Line 1315 | public class ForkJoinPool extends Abstra
1315       */
1316      private void releasePlock(int ps) {
1317          plock = ps;
1318 <        synchronized(this) { notifyAll(); }
1318 >        synchronized (this) { notifyAll(); }
1319      }
1320  
1321      //  Registering and deregistering workers
# Line 1631 | Line 1632 | public class ForkJoinPool extends Abstra
1632       * termination and possibly shrink pool.
1633       *
1634       * * If already enqueued and none of the above apply, possibly
1635 <     * (with 1/2 probablility) park awaiting signal, else lingering to
1635 >     * (with 1/2 probability) park awaiting signal, else lingering to
1636       * help scan and signal.
1637       *
1638       * @param w the worker (via its WorkQueue)
# Line 2304 | Line 2305 | public class ForkJoinPool extends Abstra
2305                                  }
2306                                  break;
2307                              }
2308 <                        } while((r = r.completer) != null);
2308 >                        } while ((r = r.completer) != null);
2309                      }
2310                  }
2311                  if (task != null)
# Line 3195 | Line 3196 | public class ForkJoinPool extends Abstra
3196                             getSystemClassLoader().loadClass(hp).newInstance());
3197              if (pp != null)
3198                  par = Integer.parseInt(pp);
3199 <        } catch(Exception ignore) {
3199 >        } catch (Exception ignore) {
3200          }
3201  
3202          int s; // initialize field offsets for CAS etc

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines