diff options
author | Melanie Thielker | 2008-09-21 21:47:00 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-21 21:47:00 +0000 |
commit | 94aaf67dfaafbcbd4d871f674c465a34c1c1f332 (patch) | |
tree | 33476e5660a95bdf7d29d14beae67a6294af28a7 /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | |
parent | * minor: warnings removal (diff) | |
download | opensim-SC-94aaf67dfaafbcbd4d871f674c465a34c1c1f332.zip opensim-SC-94aaf67dfaafbcbd4d871f674c465a34c1c1f332.tar.gz opensim-SC-94aaf67dfaafbcbd4d871f674c465a34c1c1f332.tar.bz2 opensim-SC-94aaf67dfaafbcbd4d871f674c465a34c1c1f332.tar.xz |
Change the scirpt engine loading mechanism. Script engines are now
ordinary region modules and are able to coexist in one instance.
See http://opensimulator.org/wiki/ScriptEngines for details. There were
changes to OpenSim.ini.example, please note DefaultScriptEngine.
Also see the User docs and FAQ on the Wiki. Default is DotNetEngine.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 60333b1..47cb2fd 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | |||
@@ -64,6 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
64 | private static bool PrivateThread; | 64 | private static bool PrivateThread; |
65 | private int LoadUnloadMaxQueueSize; | 65 | private int LoadUnloadMaxQueueSize; |
66 | private Object scriptLock = new Object(); | 66 | private Object scriptLock = new Object(); |
67 | private bool m_started = false; | ||
67 | 68 | ||
68 | // Load/Unload structure | 69 | // Load/Unload structure |
69 | private struct LUStruct | 70 | private struct LUStruct |
@@ -119,6 +120,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
119 | public abstract void Initialize(); | 120 | public abstract void Initialize(); |
120 | public void Start() | 121 | public void Start() |
121 | { | 122 | { |
123 | m_started = true; | ||
124 | |||
122 | ReadConfig(); | 125 | ReadConfig(); |
123 | Initialize(); | 126 | Initialize(); |
124 | 127 | ||
@@ -213,6 +216,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
213 | 216 | ||
214 | public void DoScriptLoadUnload() | 217 | public void DoScriptLoadUnload() |
215 | { | 218 | { |
219 | if (!m_started) | ||
220 | return; | ||
221 | |||
216 | lock (LUQueue) | 222 | lock (LUQueue) |
217 | { | 223 | { |
218 | if (LUQueue.Count > 0) | 224 | if (LUQueue.Count > 0) |
@@ -258,7 +264,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
258 | { | 264 | { |
259 | lock (LUQueue) | 265 | lock (LUQueue) |
260 | { | 266 | { |
261 | if (LUQueue.Count >= LoadUnloadMaxQueueSize) | 267 | if ((LUQueue.Count >= LoadUnloadMaxQueueSize) && m_started) |
262 | { | 268 | { |
263 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); | 269 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); |
264 | return; | 270 | return; |