costin      2002/12/24 09:02:55

  Modified:    util/java/org/apache/tomcat/util/threads ThreadPool.java
  Log:
  When the thread ends, remove it from the list of active threads.
  
  Obtained from: Michael
  
  Revision  Changes    Path
  1.6       +4 -1      
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java
  
  Index: ThreadPool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ThreadPool.java   19 Dec 2002 05:45:42 -0000      1.5
  +++ ThreadPool.java   24 Dec 2002 17:02:54 -0000      1.6
  @@ -560,7 +560,7 @@
           }
   
           public void run() {
  -
  +          try {
               while(true) {
                   try {
                            /* Wait for work. */
  @@ -626,6 +626,9 @@
                    p.log.error("Unexpected exception", ie);
                   }
               }
  +          } finally {
  +              p.removeThread(Thread.currentThread());
  +          }
           }
   
           /** Run a task
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to