mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
fix modifing m_threads on a foreach scanning it
This commit is contained in:
@@ -335,7 +335,9 @@ namespace OpenSim.Framework.Monitoring
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user