Do bot startup on another thread so console is responsive during this process

0.7.3-extended
Justin Clark-Casey (justincc) 2012-05-11 01:56:00 +01:00
parent 529a3f2400
commit cfc1dba99b
2 changed files with 5 additions and 1 deletions

View File

@ -222,6 +222,7 @@ namespace pCampBot
Thread pbThread = new Thread(pb.startup);
pbThread.Name = pb.Name;
pbThread.IsBackground = true;
pbThread.Start();
}

View File

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