only silent remove threads from watch list if they stopped ( ie still consider aborted etc )
parent
f69e48bedc
commit
e8165a7b51
|
@ -254,14 +254,12 @@ namespace OpenSim.Framework.Monitoring
|
||||||
|
|
||||||
twi.Cleanup();
|
twi.Cleanup();
|
||||||
m_threads.Remove(threadID);
|
m_threads.Remove(threadID);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[WATCHDOG]: Requested to remove thread with ID {0} but this is not being monitored", threadID);
|
"[WATCHDOG]: Requested to remove thread with ID {0} but this is not being monitored", threadID);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -360,7 +358,7 @@ namespace OpenSim.Framework.Monitoring
|
||||||
List<ThreadWatchdogInfo> callbackInfos = null;
|
List<ThreadWatchdogInfo> callbackInfos = null;
|
||||||
List<ThreadWatchdogInfo> threadsToRemove = null;
|
List<ThreadWatchdogInfo> threadsToRemove = null;
|
||||||
|
|
||||||
const ThreadState thgone = ThreadState.Stopped | ThreadState.Aborted | ThreadState.AbortRequested;
|
const ThreadState thgone = ThreadState.Stopped;
|
||||||
|
|
||||||
lock (m_threads)
|
lock (m_threads)
|
||||||
{
|
{
|
||||||
|
@ -368,7 +366,7 @@ namespace OpenSim.Framework.Monitoring
|
||||||
{
|
{
|
||||||
if(!m_enabled)
|
if(!m_enabled)
|
||||||
return;
|
return;
|
||||||
if(!threadInfo.Thread.IsAlive || (threadInfo.Thread.ThreadState & thgone) != 0)
|
if((threadInfo.Thread.ThreadState & thgone) != 0)
|
||||||
{
|
{
|
||||||
if(threadsToRemove == null)
|
if(threadsToRemove == null)
|
||||||
threadsToRemove = new List<ThreadWatchdogInfo>();
|
threadsToRemove = new List<ThreadWatchdogInfo>();
|
||||||
|
|
Loading…
Reference in New Issue