From 0ddf3c5289f32fc5ed3283d493f305286058e48c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 11 May 2012 01:56:00 +0100 Subject: Do bot startup on another thread so console is responsive during this process --- OpenSim/Tools/pCampBot/BotManager.cs | 1 + OpenSim/Tools/pCampBot/pCampBot.cs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index d06c55b..6d4bdb1 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -222,6 +222,7 @@ namespace pCampBot Thread pbThread = new Thread(pb.startup); pbThread.Name = pb.Name; pbThread.IsBackground = true; + pbThread.Start(); } diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs index ec5ad04..52e7501 100644 --- a/OpenSim/Tools/pCampBot/pCampBot.cs +++ b/OpenSim/Tools/pCampBot/pCampBot.cs @@ -27,6 +27,7 @@ using System; using System.Reflection; +using System.Threading; using log4net; using Nini.Config; using OpenSim.Framework; @@ -67,7 +68,9 @@ namespace pCampBot BotManager bm = new BotManager(); //startup specified number of bots. 1 is the default - bm.dobotStartup(botcount, config); + Thread startBotThread = new Thread(o => bm.dobotStartup(botcount, config)); + startBotThread.Name = "Initial start bots thread"; + startBotThread.Start(); while (true) { -- cgit v1.1