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. --- OpenSim/Region/Environment/Modules/ChatModule.cs | 12 ++++++++++-- OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs | 1 + OpenSim/Region/Environment/Modules/TextureDownloadModule.cs | 1 + OpenSim/Region/Environment/Modules/XMLRPCModule.cs | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 0510ad6..c146941 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs @@ -113,7 +113,10 @@ namespace OpenSim.Region.Environment.Modules m_irc_connector.Name = "IRCConnectorThread"; m_irc_connector.IsBackground = true; } - if (!m_irc_connector.IsAlive) { m_irc_connector.Start(); } + if (!m_irc_connector.IsAlive) { + m_irc_connector.Start(); + OpenSim.Framework.ThreadTracker.Add(m_irc_connector); + } } catch (Exception ex) { @@ -260,7 +263,10 @@ namespace OpenSim.Region.Environment.Modules m_irc_connector.Name = "IRCConnectorThread"; m_irc_connector.IsBackground = true; } - if (!m_irc_connector.IsAlive) { m_irc_connector.Start(); } + if (!m_irc_connector.IsAlive) { + m_irc_connector.Start(); + OpenSim.Framework.ThreadTracker.Add(m_irc_connector); + } } catch (Exception ex) { @@ -421,11 +427,13 @@ namespace OpenSim.Region.Environment.Modules pingSender.Name = "PingSenderThread"; pingSender.IsBackground = true; pingSender.Start(); + OpenSim.Framework.ThreadTracker.Add(pingSender); listener = new Thread(new ThreadStart(ListenerRun)); listener.Name = "IRCChatModuleListenerThread"; listener.IsBackground = true; listener.Start(); + OpenSim.Framework.ThreadTracker.Add(listener); m_writer.WriteLine(m_user); m_writer.Flush(); diff --git a/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs index 47dd250..54a3bc0 100644 --- a/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs +++ b/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs @@ -287,6 +287,7 @@ namespace OpenSim.Region.Environment.Modules httpThread.IsBackground = true; finished = false; httpThread.Start(); + OpenSim.Framework.ThreadTracker.Add(httpThread); } /* diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs index ecf44a6..c773f9e 100644 --- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs @@ -75,6 +75,7 @@ namespace OpenSim.Region.Environment.Modules m_thread.Name = "ProcessTextureSenderThread"; m_thread.IsBackground = true; m_thread.Start(); + OpenSim.Framework.ThreadTracker.Add(m_thread); } if (!m_scenes.Contains(scene)) diff --git a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs index 3cdb576..6294a49 100644 --- a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs @@ -584,6 +584,7 @@ namespace OpenSim.Region.Environment.Modules httpThread.IsBackground = true; finished = false; httpThread.Start(); + OpenSim.Framework.ThreadTracker.Add(httpThread); return reqID; -- cgit v1.1