DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27513>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27513 When ThreadPool is shutdown one idle thread is left behind Summary: When ThreadPool is shutdown one idle thread is left behind Product: Tomcat 5 Version: 5.0.19 Platform: All OS/Version: All Status: NEW Severity: Minor Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When org.apache.tomcat.util.threads.ThreadPool.shutdown() is called it terminates all the idle threads except one (the last one that became idle). The problem is that the mentioned method explicitly leaves that thread behind. That can be easily seen (using a debugger) when tomcat is shutting down. In order to solve the problem a very small correction is needed. In the mentioned method the line: for(int i = 0 ; i < (currentThreadCount - currentThreadsBusy - 1) ; i++) { should become: for(int i = 0 ; i < (currentThreadCount - currentThreadsBusy) ; i++) { so that the loop would iterate over all the idle thread without exception. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]