Remove minor race condition where two threads could race on fields such as m_ScriptFailCount as set in XEngine.DoOnRezScriptQueue()

mb-throttle-test
Justin Clark-Casey (justincc) 2014-11-29 01:33:14 +00:00
parent 79e37e5ecc
commit 55e064baf7
1 changed files with 6 additions and 6 deletions

View File

@ -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;
}