From 2e47e5147547d355d8935404c43fbe1b61888ee1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 19:01:45 +0000 Subject: Make locking of timers and listeners in script related functions consistent See http://opensimulator.org/mantis/view.php?id=4316 Thanks KittyLiu! --- .../Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs index 0716d45..eeb59d9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs @@ -166,7 +166,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins ts.next = DateTime.Now.Ticks + (long)data[idx+1]; idx += 2; - Timers.Add(MakeTimerKey(localID,itemID), ts); + lock (TimerListLock) + { + Timers.Add(MakeTimerKey(localID, itemID), ts); + } } } } -- cgit v1.1