tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1203278 - in /tomcat/trunk/java/org/apache/tomcat/util/net: AprEndpoint.java JIoEndpoint.java NioEndpoint.java
Date Thu, 17 Nov 2011 17:15:52 GMT
Author: markt
Date: Thu Nov 17 17:15:51 2011
New Revision: 1203278

URL: http://svn.apache.org/viewvc?rev=1203278&view=rev
Log:
Reduce sleep in acceptor thread pause from 1000ms to 50ms. This
significantly speeds up shutdown, particularly with testing, with no
measurable increase in CPU usage while the acceptor is paused.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1203278&r1=1203277&r2=1203278&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Thu Nov 17 17:15:51 2011
@@ -968,7 +968,7 @@ public class AprEndpoint extends Abstrac
                 while (paused && running) {
                     state = AcceptorState.PAUSED;
                     try {
-                        Thread.sleep(1000);
+                        Thread.sleep(50);
                     } catch (InterruptedException e) {
                         // Ignore
                     }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=1203278&r1=1203277&r2=1203278&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Thu Nov 17 17:15:51 2011
@@ -185,7 +185,7 @@ public class JIoEndpoint extends Abstrac
                 while (paused && running) {
                     state = AcceptorState.PAUSED;
                     try {
-                        Thread.sleep(1000);
+                        Thread.sleep(50);
                     } catch (InterruptedException e) {
                         // Ignore
                     }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1203278&r1=1203277&r2=1203278&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Nov 17 17:15:51 2011
@@ -744,7 +744,7 @@ public class NioEndpoint extends Abstrac
                 while (paused && running) {
                     state = AcceptorState.PAUSED;
                     try {
-                        Thread.sleep(1000);
+                        Thread.sleep(50);
                     } catch (InterruptedException e) {
                         // Ignore
                     }



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


Mime
View raw message