tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r554584 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java
Date Mon, 09 Jul 2007 09:46:41 GMT
Author: rjung
Date: Mon Jul  9 02:46:40 2007
New Revision: 554584

URL: http://svn.apache.org/viewvc?view=rev&rev=554584
Log:
Separate sequence increment from getter in ThreadPool to avoid
misleading increments during monitoring via JMX.

Modified:
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java

Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java?view=diff&rev=554584&r1=554583&r2=554584
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java (original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/threads/ThreadPool.java Mon Jul
 9 02:46:40 2007
@@ -259,6 +259,10 @@
     }
 
     public int getSequence() {
+        return sequence;
+    }
+
+    public int incSequence() {
         return sequence++;
     }
 
@@ -637,7 +641,7 @@
             this.p = p;
             t = new ThreadWithAttributes(p, this);
             t.setDaemon(true);
-            t.setName(p.getName() + "-Processor" + p.getSequence());
+            t.setName(p.getName() + "-Processor" + p.incSequence());
             t.setPriority(p.getThreadPriority());
             p.addThread( t, this );
 	    noThData=true;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message