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.
This commit is contained in:
Melanie Thielker
2008-09-21 21:47:00 +00:00
parent 451bd5a0ca
commit 94aaf67dfa
19 changed files with 142 additions and 514 deletions

View File

@@ -64,6 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
private static bool PrivateThread;
private int LoadUnloadMaxQueueSize;
private Object scriptLock = new Object();
private bool m_started = false;
// Load/Unload structure
private struct LUStruct
@@ -119,6 +120,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public abstract void Initialize();
public void Start()
{
m_started = true;
ReadConfig();
Initialize();
@@ -213,6 +216,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public void DoScriptLoadUnload()
{
if (!m_started)
return;
lock (LUQueue)
{
if (LUQueue.Count > 0)
@@ -258,7 +264,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
{
lock (LUQueue)
{
if (LUQueue.Count >= LoadUnloadMaxQueueSize)
if ((LUQueue.Count >= LoadUnloadMaxQueueSize) && m_started)
{
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.");
return;