mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
Remove minor race condition where two threads could race on fields such as m_ScriptFailCount as set in XEngine.DoOnRezScriptQueue()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user