aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
index 6b2db35..d5826b7 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
@@ -82,11 +82,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
82 /// </summary> 82 /// </summary>
83 private int numberOfThreads; 83 private int numberOfThreads;
84 84
85
85 /// <summary> 86 /// <summary>
86 /// Maximum time one function can use for execution before we perform a thread kill 87 /// Maximum time one function can use for execution before we perform a thread kill
87 /// </summary> 88 /// </summary>
88 private int maxFunctionExecutionTimems; 89 private int maxFunctionExecutionTimems;
89 private bool EnforceMaxExecutionTime; 90 private bool EnforceMaxExecutionTime;
91 private bool KillScriptOnMaxFunctionExecutionTime;
90 92
91 93
92 /// <summary> 94 /// <summary>
@@ -169,7 +171,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
169 171
170 maxFunctionExecutionTimems = m_ScriptEngine.ScriptConfigSource.GetInt("MaxEventExecutionTimeMs", 5000); 172 maxFunctionExecutionTimems = m_ScriptEngine.ScriptConfigSource.GetInt("MaxEventExecutionTimeMs", 5000);
171 EnforceMaxExecutionTime = m_ScriptEngine.ScriptConfigSource.GetBoolean("EnforceMaxEventExecutionTime", false); 173 EnforceMaxExecutionTime = m_ScriptEngine.ScriptConfigSource.GetBoolean("EnforceMaxEventExecutionTime", false);
172 174 KillScriptOnMaxFunctionExecutionTime = m_ScriptEngine.ScriptConfigSource.GetBoolean("DeactivateScriptOnTimeout", false);
173 175
174 176
175 // Start function max exec time enforcement thread 177 // Start function max exec time enforcement thread
@@ -336,6 +338,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
336 maxFunctionExecutionTimems) 338 maxFunctionExecutionTimems)
337 { 339 {
338 // We need to kill this thread! 340 // We need to kill this thread!
341 EventQueueThread.KillCurrentScript = KillScriptOnMaxFunctionExecutionTime;
339 AbortThreadClass(EventQueueThread); 342 AbortThreadClass(EventQueueThread);
340 // Then start another 343 // Then start another
341 StartNewThreadClass(); 344 StartNewThreadClass();