thread pool info on error

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@403 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2009-06-16 02:30:17 +00:00
parent ce676c1c9e
commit 2e42ce034b
3 changed files with 10 additions and 8 deletions

View File

@ -149,8 +149,8 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements Runnable,
/* ------------------------------------------------------------ */
/**
* Called when a dispatched thread is no longer handling the endpoint. The selection key
* operations are updated.
* Called when a dispatched thread is no longer handling the endpoint.
* The selection key operations are updated.
*/
protected boolean undispatch()
{
@ -413,7 +413,6 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements Runnable,
*/
public void run()
{
boolean dispatched=true;
do
{
@ -475,11 +474,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements Runnable,
/* ------------------------------------------------------------ */
public String toString()
{
return "SCEP@" + hashCode() + "[d=" + _dispatched + ",io=" +
((SelectionKey.OP_ACCEPT&_interestOps)!=0?"A":"")+
((SelectionKey.OP_CONNECT&_interestOps)!=0?"C":"")+
((SelectionKey.OP_READ&_interestOps)!=0?"R":"")+
((SelectionKey.OP_WRITE&_interestOps)!=0?"W":"")+
return "SCEP@" + hashCode() + "\t[d=" + _dispatched + ",io=" + _interestOps+
",w=" + _writable + ",b=" + _readBlocked + "|" + _writeBlocked + "]";
}

View File

@ -306,6 +306,7 @@ public class StressTest extends TestCase
if (same++>10)
{
System.err.println("STALLED!!!");
System.err.println(_server.getThreadPool().toString());
((SelectChannelConnector)(_server.getConnectors()[0])).dump();
Thread.sleep(5000);
System.exit(1);

View File

@ -386,6 +386,12 @@ public class QueuedThreadPool extends AbstractLifeCycle implements ThreadPool, E
{
return new Thread(runnable);
}
/* ------------------------------------------------------------ */
public String toString()
{
return _name+"{"+getMinThreads()+"<="+getIdleThreads()+"<="+getThreads()+"/"+getMaxThreads()+"}";
}
/* ------------------------------------------------------------ */
private Runnable _runnable = new Runnable()