Forgot mutex lock on List<> for timers
parent
d9b9b16513
commit
53ef427e9e
|
@ -124,20 +124,24 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
if (Timers.Count == 0)
|
if (Timers.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Go through all timers
|
lock (ListLock)
|
||||||
foreach (TimerClass ts in Timers)
|
|
||||||
{
|
{
|
||||||
// Time has passed?
|
|
||||||
if (ts.next.ToUniversalTime() < DateTime.Now.ToUniversalTime())
|
// Go through all timers
|
||||||
|
foreach (TimerClass ts in Timers)
|
||||||
{
|
{
|
||||||
// Add it to queue
|
// Time has passed?
|
||||||
myScriptEngine.myEventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", new object[] { });
|
if (ts.next.ToUniversalTime() < DateTime.Now.ToUniversalTime())
|
||||||
// set next interval
|
{
|
||||||
|
// Add it to queue
|
||||||
|
myScriptEngine.myEventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", new object[] { });
|
||||||
ts.next = DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
// set next interval
|
||||||
|
|
||||||
|
|
||||||
|
ts.next = DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} // lock
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue