aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index cc783aa..d763063 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -78,7 +78,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
78 private IConfigSource m_ConfigSource = null; 78 private IConfigSource m_ConfigSource = null;
79 private ICompiler m_Compiler; 79 private ICompiler m_Compiler;
80 private int m_MinThreads; 80 private int m_MinThreads;
81 private int m_MaxThreads ; 81 private int m_MaxThreads;
82
83 /// <summary>
84 /// Amount of time to delay before starting.
85 /// </summary>
86 private int m_StartDelay;
87
82 private int m_IdleTimeout; 88 private int m_IdleTimeout;
83 private int m_StackSize; 89 private int m_StackSize;
84 private int m_SleepTime; 90 private int m_SleepTime;
@@ -299,6 +305,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
299 m_MaxThreads = m_ScriptConfig.GetInt("MaxThreads", 100); 305 m_MaxThreads = m_ScriptConfig.GetInt("MaxThreads", 100);
300 m_IdleTimeout = m_ScriptConfig.GetInt("IdleTimeout", 60); 306 m_IdleTimeout = m_ScriptConfig.GetInt("IdleTimeout", 60);
301 string priority = m_ScriptConfig.GetString("Priority", "BelowNormal"); 307 string priority = m_ScriptConfig.GetString("Priority", "BelowNormal");
308 m_StartDelay = m_ScriptConfig.GetInt("StartDelay", 15000);
302 m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300); 309 m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300);
303 m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144); 310 m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144);
304 m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000; 311 m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000;
@@ -957,7 +964,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
957 { 964 {
958 // This delay exists to stop mono problems where script compilation and startup would stop the sim 965 // This delay exists to stop mono problems where script compilation and startup would stop the sim
959 // working properly for the session. 966 // working properly for the session.
960 System.Threading.Thread.Sleep(15000); 967 System.Threading.Thread.Sleep(m_StartDelay);
961 } 968 }
962 969
963 object[] o; 970 object[] o;
@@ -1768,12 +1775,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1768 1775
1769 public string GetXMLState(UUID itemID) 1776 public string GetXMLState(UUID itemID)
1770 { 1777 {
1771// m_log.DebugFormat("[XEngine]: Getting XML state for {0}", itemID); 1778// m_log.DebugFormat("[XEngine]: Getting XML state for script instance {0}", itemID);
1772 1779
1773 IScriptInstance instance = GetInstance(itemID); 1780 IScriptInstance instance = GetInstance(itemID);
1774 if (instance == null) 1781 if (instance == null)
1775 { 1782 {
1776// m_log.DebugFormat("[XEngine]: Found no script for {0}, returning empty string", itemID); 1783// m_log.DebugFormat("[XEngine]: Found no script instance for {0}, returning empty string", itemID);
1777 return ""; 1784 return "";
1778 } 1785 }
1779 1786
@@ -1848,7 +1855,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1848 tfs.Read(tdata, 0, tdata.Length); 1855 tfs.Read(tdata, 0, tdata.Length);
1849 } 1856 }
1850 1857
1851 assem = new System.Text.ASCIIEncoding().GetString(tdata); 1858 assem = Encoding.ASCII.GetString(tdata);
1852 } 1859 }
1853 catch (Exception e) 1860 catch (Exception e)
1854 { 1861 {