aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs23
1 files changed, 10 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
index e1b1b6c..5e06fcd 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
@@ -44,7 +44,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
44 [Serializable] 44 [Serializable]
45 public class EventQueueManager : iScriptEngineFunctionModule 45 public class EventQueueManager : iScriptEngineFunctionModule
46 { 46 {
47
48 // 47 //
49 // Class is instanced in "ScriptEngine" and used by "EventManager" also instanced in "ScriptEngine". 48 // Class is instanced in "ScriptEngine" and used by "EventManager" also instanced in "ScriptEngine".
50 // 49 //
@@ -256,16 +255,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
256 255
257 #endregion 256 #endregion
258 257
259
260 #region " Start / stop script execution threads (ThreadClasses) " 258 #region " Start / stop script execution threads (ThreadClasses) "
261 private void StartNewThreadClass() 259 private void StartNewThreadClass()
262 { 260 {
263 EventQueueThreadClass eqtc = new EventQueueThreadClass(this); 261 EventQueueThreadClass eqtc = new EventQueueThreadClass(this);
264 eventQueueThreads.Add(eqtc); 262 eventQueueThreads.Add(eqtc);
265 staticGlobalEventQueueThreads.Add(eqtc); 263 staticGlobalEventQueueThreads.Add(eqtc);
266 m_ScriptEngine.Log.Debug(m_ScriptEngine.ScriptEngineName, "Started new script execution thread. Current thread count: " + eventQueueThreads.Count); 264 m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Started new script execution thread. Current thread count: " + eventQueueThreads.Count);
267
268 } 265 }
266
269 private void AbortThreadClass(EventQueueThreadClass threadClass) 267 private void AbortThreadClass(EventQueueThreadClass threadClass)
270 { 268 {
271 if (eventQueueThreads.Contains(threadClass)) 269 if (eventQueueThreads.Contains(threadClass))
@@ -279,10 +277,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
279 } 277 }
280 catch (Exception ex) 278 catch (Exception ex)
281 { 279 {
282 m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName + ":EventQueueManager", "If you see this, could you please report it to Tedd:"); 280 m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: If you see this, could you please report it to Tedd:");
283 m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName + ":EventQueueManager", "Script thread execution timeout kill ended in exception: " + ex.ToString()); 281 m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: Script thread execution timeout kill ended in exception: " + ex.ToString());
284 } 282 }
285 m_ScriptEngine.Log.Debug(m_ScriptEngine.ScriptEngineName, "Killed script execution thread. Remaining thread count: " + eventQueueThreads.Count); 283 m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Killed script execution thread. Remaining thread count: " + eventQueueThreads.Count);
286 } 284 }
287 #endregion 285 #endregion
288 286
@@ -334,8 +332,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
334 public void AddToObjectQueue(uint localID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) 332 public void AddToObjectQueue(uint localID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
335 { 333 {
336 // Determine all scripts in Object and add to their queue 334 // Determine all scripts in Object and add to their queue
337 //myScriptEngine.m_logger.Verbose(ScriptEngineName, "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); 335 //myScriptEngine.log.Info("[" + ScriptEngineName + "]: EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName);
338
339 336
340 // Do we have any scripts in this object at all? If not, return 337 // Do we have any scripts in this object at all? If not, return
341 if (m_ScriptEngine.m_ScriptManager.Scripts.ContainsKey(localID) == false) 338 if (m_ScriptEngine.m_ScriptManager.Scripts.ContainsKey(localID) == false)
@@ -368,8 +365,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
368 { 365 {
369 if (eventQueue.Count >= EventExecutionMaxQueueSize) 366 if (eventQueue.Count >= EventExecutionMaxQueueSize)
370 { 367 {
371 m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "ERROR: Event execution queue item count is at " + eventQueue.Count + ". Config variable \"EventExecutionMaxQueueSize\" is set to " + EventExecutionMaxQueueSize + ", so ignoring new event."); 368 m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: ERROR: Event execution queue item count is at " + eventQueue.Count + ". Config variable \"EventExecutionMaxQueueSize\" is set to " + EventExecutionMaxQueueSize + ", so ignoring new event.");
372 m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "Event ignored: localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); 369 m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Event ignored: localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName);
373 return; 370 return;
374 } 371 }
375 372
@@ -456,6 +453,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
456 } 453 }
457 } 454 }
458 #endregion 455 #endregion
456
459 /// <summary> 457 /// <summary>
460 /// If set to true then threads and stuff should try to make a graceful exit 458 /// If set to true then threads and stuff should try to make a graceful exit
461 /// </summary> 459 /// </summary>
@@ -465,6 +463,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
465 set { _PleaseShutdown = value; } 463 set { _PleaseShutdown = value; }
466 } 464 }
467 private bool _PleaseShutdown = false; 465 private bool _PleaseShutdown = false;
468
469 } 466 }
470} \ No newline at end of file 467}