SCRIPT SUPPORT IS STILL BROKEN.

Bugfix: Scripts exceeding max and set to be killed were not killed, only removed.
Added ability to re-read configuration while OpenSim is running
All regions now sharing one MaintenanceThread
New MaintenanceThread:
- checks for script execution timeout
- re-reads config
- starts/stops threads if thread active count becomes too high/low compared to config
Speed increase on event execution:
- Reuse of try{}catch{} blocks
- Time calculation on event execution
This commit is contained in:
Tedd Hansen
2008-02-01 22:18:55 +00:00
parent 8a4e8a8e31
commit a6726b0c9d
5 changed files with 424 additions and 198 deletions

View File

@@ -55,6 +55,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public IConfig ScriptConfigSource;
public abstract string ScriptConfigSourceName { get; }
/// <summary>
/// How many seconds between re-reading config-file. 0 = never. ScriptEngine will try to adjust to new config changes.
/// </summary>
public int ReReadConfigFileSeconds {
get { return (int)(ReReadConfigFilens / 10000); }
set { ReReadConfigFilens = value * 10000; }
}
public long ReReadConfigFilens = 0;
public ScriptManager GetScriptManager()
{
return _GetScriptManager();
@@ -93,6 +102,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
m_AppDomainManager = new AppDomainManager(ScriptConfigSource.GetInt("ScriptsPerAppDomain", 1));
m_LSLLongCmdHandler = new LSLLongCmdHandler(this);
ReReadConfigFileSeconds = ScriptConfigSource.GetInt("ReReadConfig", 0);
// Should we iterate the region for scripts that needs starting?
// Or can we assume we are loaded before anything else so we can use proper events?
}