From 47c909ca0af6e39a55b38db74df49c7629b552b9 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Tue, 19 Feb 2008 12:02:53 +0000 Subject: Playing "Name that thread". Adding names and isbackground=true to all threads so it will be easier to debug. --- OpenSim/Region/Application/OpenSimMain.cs | 5 ++--- OpenSim/Region/ClientStack/ClientView.cs | 1 + OpenSim/Region/Environment/Modules/ChatModule.cs | 21 ++++++++++++++++++--- .../Environment/Modules/TextureDownloadModule.cs | 1 + 4 files changed, 22 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index bc271dc..c59106f 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -181,7 +181,7 @@ namespace OpenSim config.Set("storage_prim_inventories", true); config.Set("startup_console_commands_file", String.Empty); config.Set("shutdown_console_commands_file", String.Empty); - config.Set("script_engine", ""); + config.Set("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); config.Set("asset_database", "sqlite"); } @@ -264,8 +264,7 @@ namespace OpenSim m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", String.Empty); m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", String.Empty); - m_scriptEngine = startupConfig.GetString("script_engine", ""); - + m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); m_assetStorage = startupConfig.GetString("asset_database", "sqlite"); m_timedScript = startupConfig.GetString("timer_Script", "disabled"); diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 388a502..dfdc777 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -225,6 +225,7 @@ namespace OpenSim.Region.ClientStack RegisterLocalPacketHandlers(); m_clientThread = new Thread(new ThreadStart(AuthUser)); + m_clientThread.Name = "ClientThread"; m_clientThread.IsBackground = true; m_clientThread.Start(); } diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index a34bd96..c6aae73 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs @@ -92,7 +92,11 @@ namespace OpenSim.Region.Environment.Modules // setup IRC Relay if (m_irc == null) { m_irc = new IRCChatModule(config); } - if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun); } + if (m_irc_connector == null) { + m_irc_connector = new Thread(IRCConnectRun); + m_irc_connector.Name = "IRCConnectorThread"; + m_irc_connector.IsBackground = true; + } } } @@ -104,7 +108,11 @@ namespace OpenSim.Region.Environment.Modules try { //m_irc.Connect(m_scenes); - if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun); } + if (m_irc_connector == null) { + m_irc_connector = new Thread(IRCConnectRun); + m_irc_connector.Name = "IRCConnectorThread"; + m_irc_connector.IsBackground = true; + } if (!m_irc_connector.IsAlive) { m_irc_connector.Start(); } } catch (Exception ex) @@ -248,7 +256,10 @@ namespace OpenSim.Region.Environment.Modules // In a non-blocking way. Eventually the connector will get it started try { - if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun); } + if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun); + m_irc_connector.Name = "IRCConnectorThread"; + m_irc_connector.IsBackground = true; + } if (!m_irc_connector.IsAlive) { m_irc_connector.Start(); } } catch (Exception ex) @@ -407,9 +418,13 @@ namespace OpenSim.Region.Environment.Modules m_writer = new StreamWriter(m_stream); pingSender = new Thread(new ThreadStart(PingRun)); + pingSender.Name = "PingSenderThread"; + pingSender.IsBackground = true; pingSender.Start(); listener = new Thread(new ThreadStart(ListenerRun)); + listener.Name = "IRCChatModuleListenerThread"; + listener.IsBackground = true; listener.Start(); m_writer.WriteLine(m_user); diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs index cf558e0..ff2d418 100644 --- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs @@ -66,6 +66,7 @@ namespace OpenSim.Region.Environment.Modules { //Console.WriteLine("Creating Texture download module"); m_thread = new Thread(new ThreadStart(ProcessTextureSenders)); + m_thread.Name = "ProcessTextureSenderThread"; m_thread.IsBackground = true; m_thread.Start(); } -- cgit v1.1