From e6fd8365af0b0dc7a4664278c369752cb4e87155 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 17 Dec 2012 21:37:02 +0000 Subject: Extend default 1 second wait for event completion to other thread script reset (as called by llResetOtherScript()). As with script stop (via llDie()) aborting other scripts event threads, llResetOtherScript() can also abort any current event thread on another script. On mono 2.6, 2.10 and possibly later this may cause locking problems in certain code areas. This commit reuses the recently introduced [XEngine] WaitForEventCompletionOnScriptStop to make this a 1 sec timeout, rather than 0 secs. --- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance') diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index dfe8386..01a5e34 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -877,7 +877,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance return (DateTime.Now - m_EventStart).Seconds; } - public void ResetScript() + public void ResetScript(int timeout) { if (m_Script == null) return; @@ -887,7 +887,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance RemoveState(); ReleaseControls(); - Stop(0); + Stop(timeout); SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID); part.Inventory.GetInventoryItem(ItemID).PermsMask = 0; part.Inventory.GetInventoryItem(ItemID).PermsGranter = UUID.Zero; -- cgit v1.1