352684 improve stopping

This commit is contained in:
Michael Gorovoy 2011-07-21 11:15:38 -04:00
parent 9fe3c8f67f
commit 3e621d312d
1 changed files with 15 additions and 18 deletions

View File

@ -39,8 +39,8 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
private Method findDeadlockedThreadsMethod;
private Thread _runner;
private boolean _done;
private Logger _logger;
private volatile boolean _done = true;
private Map<Long,ExtThreadInfo> _extInfo;
@ -76,23 +76,6 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
init();
}
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
*/
public void doStart()
{
_done = false;
_runner = new Thread(this);
_runner.start();
Log.info("Thread Monitor started successfully");
}
/* ------------------------------------------------------------ */
public int getScanInterval()
{
@ -129,6 +112,20 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
_stackDepth = stackDepth;
}
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
*/
public void doStart()
{
_done = false;
_runner = new Thread(this);
_runner.start();
Log.info("Thread Monitor started successfully");
}
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop()