Fix a timer list locking issue causing XMREngine deadlocks

avinationmerge
Melanie 2009-12-30 00:27:01 +01:00
parent 8ad8bd6282
commit 06f639b8f3
1 changed files with 17 additions and 15 deletions

View File

@ -109,10 +109,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
if (Timers.Count == 0) if (Timers.Count == 0)
return; return;
Dictionary<string, TimerClass>.ValueCollection tvals;
lock (TimerListLock) lock (TimerListLock)
{ {
// Go through all timers // Go through all timers
Dictionary<string, TimerClass>.ValueCollection tvals = Timers.Values; tvals = Timers.Values;
}
foreach (TimerClass ts in tvals) foreach (TimerClass ts in tvals)
{ {
// Time has passed? // Time has passed?
@ -130,7 +133,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
} }
} }
} }
}
public Object[] GetSerializationData(UUID itemID) public Object[] GetSerializationData(UUID itemID)
{ {