fix modifing m_threads on a foreach scanning it
parent
2130984bef
commit
4b1ecc90fc
|
@ -335,7 +335,9 @@ namespace OpenSim.Framework.Monitoring
|
||||||
|
|
||||||
lock (m_threads)
|
lock (m_threads)
|
||||||
{
|
{
|
||||||
foreach (ThreadWatchdogInfo threadInfo in m_threads.Values)
|
// get a copy since we may change m_threads
|
||||||
|
List<ThreadWatchdogInfo> threadsInfo = m_threads.Values.ToList();
|
||||||
|
foreach (ThreadWatchdogInfo threadInfo in threadsInfo)
|
||||||
{
|
{
|
||||||
if (threadInfo.Thread.ThreadState == ThreadState.Stopped)
|
if (threadInfo.Thread.ThreadState == ThreadState.Stopped)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue