From 7102ac77698f4bfd7406d6e8871db7b006c2cae2 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Thu, 21 Feb 2008 10:43:24 +0000 Subject: "threads" command now works. I've added manual tracking of threads (only if compiled in DEBUG mode)... Its ugly and even requires a separate thread to track the treads, but it will be very valuable in debugging. --- .../ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs | 1 + .../Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | 1 + OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | 1 + OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | 1 + 4 files changed, 4 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase') diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs index 222b8f2..81e3438 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs @@ -57,6 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase cmdHandlerThread.Priority = ThreadPriority.BelowNormal; cmdHandlerThread.IsBackground = true; cmdHandlerThread.Start(); + OpenSim.Framework.ThreadTracker.Add(cmdHandlerThread); } public void ReadConfig() diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index d4db935..6f96654 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -117,6 +117,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase EventQueueThread.Priority = MyThreadPriority; EventQueueThread.Name = "EventQueueManagerThread_" + ThreadCount; EventQueueThread.Start(); + OpenSim.Framework.ThreadTracker.Add(EventQueueThread); // Look at this... Don't you wish everyone did that solid coding everywhere? :P if (ThreadCount == int.MaxValue) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 47446a3..4776ffe 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs @@ -78,6 +78,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase MaintenanceThreadThread.Name = "ScriptMaintenanceThread"; MaintenanceThreadThread.IsBackground = true; MaintenanceThreadThread.Start(); + OpenSim.Framework.ThreadTracker.Add(MaintenanceThreadThread); } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 43ff4ac..684d133 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs @@ -160,6 +160,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase t.IsBackground = true; t.Priority = ThreadPriority.Normal; t.Start(); + OpenSim.Framework.ThreadTracker.Add(t); return t; } -- cgit v1.1