revert last change to watchdog timeouts, that should not be needed

LSLKeyTest
UbitUmarov 2015-11-27 13:32:49 +00:00
parent baf8e762a6
commit 9224b5d680
1 changed files with 23 additions and 27 deletions

View File

@ -332,20 +332,15 @@ namespace OpenSim.Framework.Monitoring
if (callback != null) if (callback != null)
{ {
List<ThreadWatchdogInfo> callbackInfos = null; List<ThreadWatchdogInfo> callbackInfos = null;
// get a copy since we may change m_threads
List<ThreadWatchdogInfo> threadsInfo; List<ThreadWatchdogInfo> threadsInfo;
lock (m_threads) lock (m_threads)
{
// get a copy since we may change m_threads
threadsInfo = m_threads.Values.ToList(); threadsInfo = m_threads.Values.ToList();
foreach(ThreadWatchdogInfo threadInfo in threadsInfo) foreach(ThreadWatchdogInfo threadInfo in threadsInfo)
{ {
lock (m_threads)
{
if(!m_threads.ContainsValue(threadInfo))
continue;
}
if(threadInfo.Thread.ThreadState == ThreadState.Stopped) if(threadInfo.Thread.ThreadState == ThreadState.Stopped)
{ {
RemoveThread(threadInfo.Thread.ManagedThreadId); RemoveThread(threadInfo.Thread.ManagedThreadId);
@ -370,6 +365,7 @@ namespace OpenSim.Framework.Monitoring
} }
} }
} }
}
if(callbackInfos != null) if(callbackInfos != null)
foreach (ThreadWatchdogInfo callbackInfo in callbackInfos) foreach (ThreadWatchdogInfo callbackInfo in callbackInfos)