aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
diff options
context:
space:
mode:
authorTedd Hansen2008-02-22 22:24:12 +0000
committerTedd Hansen2008-02-22 22:24:12 +0000
commitf06a6573bb94d1a61ddabd1289d0ea541f7788c1 (patch)
tree87b5a5b08507e5594ccd786b1c002d4e985f5d10 /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
parent* Converted the last of the events to the private delegate instance method to... (diff)
downloadopensim-SC_OLD-f06a6573bb94d1a61ddabd1289d0ea541f7788c1.zip
opensim-SC_OLD-f06a6573bb94d1a61ddabd1289d0ea541f7788c1.tar.gz
opensim-SC_OLD-f06a6573bb94d1a61ddabd1289d0ea541f7788c1.tar.bz2
opensim-SC_OLD-f06a6573bb94d1a61ddabd1289d0ea541f7788c1.tar.xz
One more: Async LSL command thread is also shared now.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs28
1 files changed, 9 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
index 60416eb..b861ad5 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
@@ -84,7 +84,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
84 public ScriptEngine() 84 public ScriptEngine()
85 { 85 {
86 Common.mySE = this; // For logging, just need any instance, doesn't matter 86 Common.mySE = this; // For logging, just need any instance, doesn't matter
87 ScriptEngines.Add(this); // Keep a list of ScriptEngines for shared threads to process all instances 87 lock (ScriptEngines)
88 {
89 ScriptEngines.Add(this); // Keep a list of ScriptEngines for shared threads to process all instances
90 }
88 } 91 }
89 92
90 public void InitializeEngine(Scene Sceneworld, IConfigSource config, bool HookUpToServer, ScriptManager newScriptManager) 93 public void InitializeEngine(Scene Sceneworld, IConfigSource config, bool HookUpToServer, ScriptManager newScriptManager)
@@ -107,7 +110,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
107 newScriptManager.Start(); 110 newScriptManager.Start();
108 m_ScriptManager = newScriptManager; 111 m_ScriptManager = newScriptManager;
109 m_AppDomainManager = new AppDomainManager(this); 112 m_AppDomainManager = new AppDomainManager(this);
110 m_ASYNCLSLCommandManager = new AsyncLSLCommandManager(this); 113 m_ASYNCLSLCommandManager = new AsyncLSLCommandManager();
111 if (m_MaintenanceThread == null) 114 if (m_MaintenanceThread == null)
112 m_MaintenanceThread = new MaintenanceThread(); 115 m_MaintenanceThread = new MaintenanceThread();
113 116
@@ -121,7 +124,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
121 public void Shutdown() 124 public void Shutdown()
122 { 125 {
123 // We are shutting down 126 // We are shutting down
124 ScriptEngines.Remove(this); 127 lock (ScriptEngines)
128 {
129 ScriptEngines.Remove(this);
130 }
125 } 131 }
126 132
127 ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ScriptEngine.EventManager() 133 ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ScriptEngine.EventManager()
@@ -136,13 +142,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
136#endif 142#endif
137 RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 30); 143 RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 30);
138 144
139 // Reload from disk? No!
140 //ConfigSource.Reload();
141 //if (File.Exists(OpenSim.Application.iniFilePath))
142 //{
143 // //ConfigSource.Merge(new IniConfigSource(OpenSim.Application.iniFilePath));
144 //}
145
146 145
147 // Create a new object (probably not necessary?) 146 // Create a new object (probably not necessary?)
148// ScriptConfigSource = ConfigSource.Configs[ScriptEngineName]; 147// ScriptConfigSource = ConfigSource.Configs[ScriptEngineName];
@@ -179,15 +178,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
179 178
180 #endregion 179 #endregion
181 180
182 /// <summary>
183 /// If set to true then threads and stuff should try to make a graceful exit
184 /// </summary>
185 //public bool PleaseShutdown
186 //{
187 // get { return _PleaseShutdown; }
188 // set { _PleaseShutdown = value; }
189 //}
190 //private bool _PleaseShutdown = false;
191 181
192 } 182 }
193} 183}