Author: markt Date: Mon Aug 4 17:50:53 2014 New Revision: 1615712 URL: http://svn.apache.org/r1615712 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56796 Remove unnecessary sleep when stopping a web application.
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1615710 Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java?rev=1615712&r1=1615711&r2=1615712&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java Mon Aug 4 17:50:53 2014 @@ -199,18 +199,9 @@ public class ThreadPoolExecutor extends // setCorePoolSize(0) wakes idle threads this.setCorePoolSize(0); - // wait a little so that idle threads wake and poll the queue again, - // this time always with a timeout (queue.poll() instead of - // queue.take()) - // even if we did not wait enough, TaskQueue.take() takes care of timing - // out, so that we are sure that all threads of the pool are renewed in - // a limited time, something like + // TaskQueue.take() takes care of timing out, so that we are sure that + // all threads of the pool are renewed in a limited time, something like // (threadKeepAlive + longest request time) - try { - Thread.sleep(200L); - } catch (InterruptedException e) { - // yes, ignore - } if (taskQueue != null) { // ok, restore the state of the queue and pool Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1615712&r1=1615711&r2=1615712&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Aug 4 17:50:53 2014 @@ -78,6 +78,10 @@ or backup <code>javax.naming.directory.DirContext</code>. Based on a patch by Sheldon Shao. (violetagg) </fix> + <fix> + <bug>56796</bug>: Remove unnecessary sleep when stopping a web + application. (markt) + </fix> </changelog> </subsection> <subsection name="WebSocket"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org