Experimental

Moved DotNetScriptEngine configuration to config file.
Added option to share script execution threads between regions.
This commit is contained in:
Tedd Hansen
2008-02-01 20:12:25 +00:00
parent 5d6e89eaf9
commit a9c1f3fdb4
6 changed files with 99 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Text;
using System.Threading;
using libsecondlife;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Region.Environment.Scenes.Scripting;
@@ -16,7 +17,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
/// <summary>
/// How many ms to sleep if queue is empty
/// </summary>
private int nothingToDoSleepms = 50;
private int nothingToDoSleepms;// = 50;
public DateTime LastExecutionStarted;
public bool InExecution = false;
@@ -28,6 +29,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public EventQueueThreadClass(EventQueueManager eqm)
{
eventQueueManager = eqm;
nothingToDoSleepms = eqm.m_ScriptEngine.ScriptConfigSource.GetInt("SleepTimeIfNoScriptExecutionMs", 50);
Start();
}
@@ -183,7 +185,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
}
catch (ThreadAbortException tae)
{
throw tae;
eventQueueManager.m_ScriptEngine.Log.Notice("ScriptEngine", "ThreadAbortException while executing function.");
}
catch (Exception e)
{