> from ever getting a lock in order to replenish the queue?  When I saw
> this error, the loop was executing very quickly:
> 
> 2005-03-07 22:21:32.326 waiting for a thread..
> 2005-03-07 22:21:32.346 waiting for a thread..

50 microseconds isn't very long which means, yes, pretty fast to print
failures.

You could try increasing the timeout but that isn't the problem. I'm
attaching a tiny piece of code that will generate the error immediately (you
need to run it pool size + 1 (currently 6) times within the timeout (5
seconds)).

This locks all available pool threads in a readBlock, there is no escape as
the main event loop isn't called from the pool check (so even when the
socket disconnects the signal won't have a chance to trigger).

-- 
Anduin Withers

import java.net.*;
import java.io.*;

public class xmltest {
	public static void main(String args[]) {
		if (args.length != 1) {
			System.out.println("Usage: xmltest <host>");
		} else {
			try {
				Socket s = new Socket();
				InetSocketAddress addr = new InetSocketAddress(args[0], 6543);
				s.connect(addr);
				OutputStream os = s.getOutputStream();

				os.write("1".getBytes("iso-8859-1"));

				Thread.sleep(5 * 1000);

				return;
			} catch (Exception e) {
				System.out.println("Exception:");
				e.printStackTrace();
			}
		}
	}
}
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to