aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-05-31 23:00:10 +0100
committerJustin Clark-Casey (justincc)2013-05-31 23:00:10 +0100
commit217c7d11401dbf15ada3de750e7ad0df85a02894 (patch)
treec3ddb8b57fc25482acb46492d81c72d494cced45
parentLock areas of AsyncCommandManager where multiple threads could try to access/... (diff)
downloadopensim-SC_OLD-217c7d11401dbf15ada3de750e7ad0df85a02894.zip
opensim-SC_OLD-217c7d11401dbf15ada3de750e7ad0df85a02894.tar.gz
opensim-SC_OLD-217c7d11401dbf15ada3de750e7ad0df85a02894.tar.bz2
opensim-SC_OLD-217c7d11401dbf15ada3de750e7ad0df85a02894.tar.xz
Remove unnecessary m_scenes and m_scene from AsyncCommandManager.
These were private and the sole point of use (to know when to load config for the first time) can be done by looking at script engines instead.
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs7
1 files changed, 1 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 72e8415..998f40b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -61,12 +61,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
61 /// </remarks> 61 /// </remarks>
62 private static object staticLock = new object(); 62 private static object staticLock = new object();
63 63
64 private static List<IScene> m_Scenes = new List<IScene>();
65 private static List<IScriptEngine> m_ScriptEngines = 64 private static List<IScriptEngine> m_ScriptEngines =
66 new List<IScriptEngine>(); 65 new List<IScriptEngine>();
67 66
68 public IScriptEngine m_ScriptEngine; 67 public IScriptEngine m_ScriptEngine;
69 private IScene m_Scene;
70 68
71 private static Dictionary<IScriptEngine, Dataserver> m_Dataserver = 69 private static Dictionary<IScriptEngine, Dataserver> m_Dataserver =
72 new Dictionary<IScriptEngine, Dataserver>(); 70 new Dictionary<IScriptEngine, Dataserver>();
@@ -147,7 +145,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
147 public AsyncCommandManager(IScriptEngine _ScriptEngine) 145 public AsyncCommandManager(IScriptEngine _ScriptEngine)
148 { 146 {
149 m_ScriptEngine = _ScriptEngine; 147 m_ScriptEngine = _ScriptEngine;
150 m_Scene = m_ScriptEngine.World;
151 148
152 // If there is more than one scene in the simulator or multiple script engines are used on the same region 149 // If there is more than one scene in the simulator or multiple script engines are used on the same region
153 // then more than one thread could arrive at this block of code simultaneously. However, it cannot be 150 // then more than one thread could arrive at this block of code simultaneously. However, it cannot be
@@ -155,11 +152,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
155 // race conditions such as the later check of cmdHandlerThread == null. 152 // race conditions such as the later check of cmdHandlerThread == null.
156 lock (staticLock) 153 lock (staticLock)
157 { 154 {
158 if (m_Scenes.Count == 0) 155 if (m_ScriptEngines.Count == 0)
159 ReadConfig(); 156 ReadConfig();
160 157
161 if (!m_Scenes.Contains(m_Scene))
162 m_Scenes.Add(m_Scene);
163 if (!m_ScriptEngines.Contains(m_ScriptEngine)) 158 if (!m_ScriptEngines.Contains(m_ScriptEngine))
164 m_ScriptEngines.Add(m_ScriptEngine); 159 m_ScriptEngines.Add(m_ScriptEngine);
165 160