From 55e064baf7ceaf1117d9bdc1f7e887f1bf8493d2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 29 Nov 2014 01:33:14 +0000 Subject: Remove minor race condition where two threads could race on fields such as m_ScriptFailCount as set in XEngine.DoOnRezScriptQueue() --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 96da0a8..ebb8e52 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1076,6 +1076,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_log.InfoFormat( "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.Name); + m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount, + m_ScriptErrorMessage); + + m_ScriptFailCount = 0; + m_InitialStartup = false; + // NOTE: Despite having a lockless queue, this lock is required // to make sure there is never no compile thread while there // are still scripts to compile. This could otherwise happen @@ -1084,12 +1090,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine lock (m_CompileQueue) m_CurrentCompile = null; - m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount, - m_ScriptErrorMessage); - - m_ScriptFailCount = 0; - m_InitialStartup = false; - return null; } -- cgit v1.1