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 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/ChatModule.cs') 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(); -- cgit v1.1