diff options
author | Justin Clark-Casey (justincc) | 2014-12-09 23:59:19 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-12-09 23:59:19 +0000 |
commit | 76722d832486b521610ee422dfa4c78a5797f3a9 (patch) | |
tree | 971d337178c9fc4a8f27a1b0064b1d499cec775c /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |
parent | refactor: rename IteratingUuidGather.AddAssetUuidToInspect() and RecordAssetU... (diff) | |
download | opensim-SC-76722d832486b521610ee422dfa4c78a5797f3a9.zip opensim-SC-76722d832486b521610ee422dfa4c78a5797f3a9.tar.gz opensim-SC-76722d832486b521610ee422dfa4c78a5797f3a9.tar.bz2 opensim-SC-76722d832486b521610ee422dfa4c78a5797f3a9.tar.xz |
In XEngine, enqueue a script rez to the compile queue after setting m_CompileDict to avoid a rare but not impossible race condition.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 752b397..7ff82e6 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1020,11 +1020,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1020 | } | 1020 | } |
1021 | else | 1021 | else |
1022 | { | 1022 | { |
1023 | m_CompileQueue.Enqueue(parms); | ||
1024 | lock (m_CompileDict) | 1023 | lock (m_CompileDict) |
1025 | { | ||
1026 | m_CompileDict[itemID] = 0; | 1024 | m_CompileDict[itemID] = 0; |
1027 | } | 1025 | |
1026 | // This must occur after the m_CompileDict so that an existing compile thread cannot hit the check | ||
1027 | // in DoOnRezScript() before m_CompileDict has been updated. | ||
1028 | m_CompileQueue.Enqueue(parms); | ||
1028 | 1029 | ||
1029 | // m_log.DebugFormat("[XEngine]: Added script {0} to compile queue", itemID); | 1030 | // m_log.DebugFormat("[XEngine]: Added script {0} to compile queue", itemID); |
1030 | 1031 | ||