DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763 Tomcat 4.1.24 hangs under heavy load using http connector. ------- Additional Comments From [EMAIL PROTECTED] 2003-09-11 17:27 ------- Here is sample codes that implement queue in ThreadPool as I suggested. I do not have time and access to CVS, could someone make it a pacth? Thanks. public class ThreadPool { private RunnableQueue queue = new RunnableQueue(); public void runIt(ThreadPoolRunnable r) { queue.put(r); ...... } static public class RunnableQueue { // use a resizeable array for JDK1.1 List queue = new ArrayList(); synchronized public ThreadPoolRunnable get() { if(queue.size() == 0) wait(); ThreadPoolRunnable one = (ThreadPoolRunnable)queue.get(0); queue.remove(0); return one; } synchronized public ThreadPoolRunnable put(ThreadPoolRunnable one) { queue.add(one); notify(); } } public static class ControlRunnable implements Runnable { public void run() { try { while(true) { try { toRun = p.queue.get(); ...... } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
