From 2478d38b85f902258efabfa47674d15f7db629db Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 19 Feb 2009 05:16:25 +0000 Subject: [PATCH] Attempt to fix a Windows only race in thread termination --- .../ScriptEngine/Shared/Instance/ScriptInstance.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index a9a2dbfb7a..613c2418bb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -683,7 +683,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance if (m_SaveState) { // This will be the very first event we deliver - // (state_entry) in defualt state + // (state_entry) in default state // SaveState(m_Assembly); @@ -942,6 +942,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance bool run = Running; Stop(100); Running = run; + + // We should not be doing this, but since we are about to + // dispose this, it really doesn't make a difference + // This is meant to work around a Windows only race + // + m_InEvent = false; + return ScriptSerializer.Serialize(this); } }