Playing "Name that thread". Adding names and isbackground=true to all threads so it will be easier to debug.

ThreadPoolClientBranch
Tedd Hansen 2008-02-19 12:02:53 +00:00
parent 62f608b152
commit 47c909ca0a
9 changed files with 28 additions and 7 deletions

View File

@ -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();
}

View File

@ -97,6 +97,7 @@ namespace OpenSim.Framework.Communications.Cache
m_assetRequests = new BlockingQueue<AssetRequest>();
m_localAssetServerThread = new Thread(RunRequests);
m_localAssetServerThread.Name = "LocalAssetServerThread";
m_localAssetServerThread.IsBackground = true;
m_localAssetServerThread.Start();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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");

View File

@ -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();
}

View File

@ -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);

View File

@ -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();
}

View File

@ -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);
}