ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java (file contents):
Revision 1.72 by jsr166, Fri Jun 24 20:44:49 2005 UTC vs.
Revision 1.73 by jsr166, Mon Aug 15 20:51:15 2005 UTC

# Line 475 | Line 475 | public class ThreadPoolExecutor extends
475      Runnable getTask() {
476          for (;;) {
477              try {
478 <                switch(runState) {
478 >                switch (runState) {
479                  case RUNNING: {
480                      // untimed wait if core and not allowing core timeout
481                      if (poolSize <= corePoolSize && !allowCoreThreadTimeOut)
# Line 622 | Line 622 | public class ThreadPoolExecutor extends
622          }
623  
624          /**
625 <         * Interrupt thread if not running a task
625 >         * Interrupts thread if not running a task.
626           */
627          void interruptIfIdle() {
628              final ReentrantLock runLock = this.runLock;
# Line 636 | Line 636 | public class ThreadPoolExecutor extends
636          }
637  
638          /**
639 <         * Interrupt thread even if running a task.
639 >         * Interrupts thread even if running a task.
640           */
641          void interruptNow() {
642              thread.interrupt();
643          }
644  
645          /**
646 <         * Run a single task between before/after methods.
646 >         * Runs a single task between before/after methods.
647           */
648          private void runTask(Runnable task) {
649              final ReentrantLock runLock = this.runLock;
# Line 1452 | Line 1452 | public class ThreadPoolExecutor extends
1452       * Method invoked prior to executing the given Runnable in the
1453       * given thread.  This method is invoked by thread <tt>t</tt> that
1454       * will execute task <tt>r</tt>, and may be used to re-initialize
1455 <     * ThreadLocals, or to perform logging. This implementation does
1456 <     * nothing, but may be customized in subclasses. Note: To properly
1457 <     * nest multiple overridings, subclasses should generally invoke
1458 <     * <tt>super.beforeExecute</tt> at the end of this method.
1455 >     * ThreadLocals, or to perform logging.
1456 >     *
1457 >     * <p>This implementation does nothing, but may be customized in
1458 >     * subclasses. Note: To properly nest multiple overridings, subclasses
1459 >     * should generally invoke <tt>super.beforeExecute</tt> at the end of
1460 >     * this method.
1461       *
1462       * @param t the thread that will run task r.
1463       * @param r the task that will be executed.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines