In XEngine, enqueue a script rez to the compile queue after setting m_CompileDict to avoid a rare but not impossible race condition.

mb-throttle-test
Justin Clark-Casey (justincc) 2014-12-09 23:59:19 +00:00
parent f3ab7c0f5c
commit 76722d8324
1 changed files with 4 additions and 3 deletions

View File

@ -1020,11 +1020,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine
} }
else else
{ {
m_CompileQueue.Enqueue(parms);
lock (m_CompileDict) lock (m_CompileDict)
{
m_CompileDict[itemID] = 0; m_CompileDict[itemID] = 0;
}
// This must occur after the m_CompileDict so that an existing compile thread cannot hit the check
// in DoOnRezScript() before m_CompileDict has been updated.
m_CompileQueue.Enqueue(parms);
// m_log.DebugFormat("[XEngine]: Added script {0} to compile queue", itemID); // m_log.DebugFormat("[XEngine]: Added script {0} to compile queue", itemID);