From 33cff9b9d7c9d742b1cb7064ed78677e3f030e72 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 11 Jul 2012 21:55:18 +0100 Subject: Allow XEngine StartDelay to be configured in the [XEngine] config section. This is only currently meant for use by regression tests that don't have any issues if XEngine is started up quickly, since no other operations will be occuring simultaneously. Therefore, this is not yet documented externally. --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs') diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index e07ae1c..f768cf2 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -77,7 +77,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine private IConfigSource m_ConfigSource = null; private ICompiler m_Compiler; private int m_MinThreads; - private int m_MaxThreads ; + private int m_MaxThreads; + + /// + /// Amount of time to delay before starting. + /// + private int m_StartDelay; + private int m_IdleTimeout; private int m_StackSize; private int m_SleepTime; @@ -231,6 +237,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_MaxThreads = m_ScriptConfig.GetInt("MaxThreads", 100); m_IdleTimeout = m_ScriptConfig.GetInt("IdleTimeout", 60); string priority = m_ScriptConfig.GetString("Priority", "BelowNormal"); + m_StartDelay = m_ScriptConfig.GetInt("StartDelay", 15000); m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300); m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144); m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000; @@ -886,7 +893,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine { // This delay exists to stop mono problems where script compilation and startup would stop the sim // working properly for the session. - System.Threading.Thread.Sleep(15000); + System.Threading.Thread.Sleep(m_StartDelay); } object[] o; -- cgit v1.1