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. --- .../Framework/Communications/Cache/AssetCache.cs | 1 + .../Communications/Cache/AssetServerBase.cs | 1 + OpenSim/Framework/Servers/BaseHttpServer.cs | 1 + .../ScriptServer/ScriptServer/RegionCommManager.cs | 2 +- OpenSim/Region/Application/OpenSimMain.cs | 5 ++--- OpenSim/Region/ClientStack/ClientView.cs | 1 + OpenSim/Region/Environment/Modules/ChatModule.cs | 21 ++++++++++++++++++--- .../Environment/Modules/TextureDownloadModule.cs | 1 + OpenSim/Tools/pCampBot/BotManager.cs | 2 ++ 9 files changed, 28 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index effaa82..b793b62 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -143,6 +143,7 @@ namespace OpenSim.Framework.Communications.Cache m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); + m_assetCacheThread.Name = "AssetCacheThread"; m_assetCacheThread.IsBackground = true; m_assetCacheThread.Start(); } diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 6820027..9d9bc1e 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs @@ -97,6 +97,7 @@ namespace OpenSim.Framework.Communications.Cache m_assetRequests = new BlockingQueue(); m_localAssetServerThread = new Thread(RunRequests); + m_localAssetServerThread.Name = "LocalAssetServerThread"; m_localAssetServerThread.IsBackground = true; m_localAssetServerThread.Start(); } diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 7f9e1a1..2966349 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -531,6 +531,7 @@ namespace OpenSim.Framework.Servers m_log.Info("[HTTPD]: Starting up HTTP Server"); m_workerThread = new Thread(new ThreadStart(StartHTTP)); + m_workerThread.Name = "HttpThread"; m_workerThread.IsBackground = true; m_workerThread.Start(); } diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs index 524b8c4..cdddcc2 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs @@ -58,7 +58,7 @@ namespace OpenSim.Grid.ScriptServer // Start listener Stop(); listenThread = new Thread(ListenThreadLoop); - listenThread.Name = "listenThread"; + listenThread.Name = "ListenThread"; listenThread.IsBackground = true; listenThread.Start(); } 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(); } diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 0c7fa4e..1dc1dc1 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -114,6 +114,8 @@ namespace pCampBot if (cs.GetString("lastname", "random") == "random") pb.lastname = CreateRandomName(); m_td[pos] = new Thread(pb.startup); + m_td[pos].Name = "CampBot_" + pos; + m_td[pos].IsBackground = true; m_td[pos].Start(); m_lBot.Add(pb); } -- cgit v1.1