Do bot startup on another thread so console is responsive during this process
parent
529a3f2400
commit
cfc1dba99b
|
@ -222,6 +222,7 @@ namespace pCampBot
|
||||||
Thread pbThread = new Thread(pb.startup);
|
Thread pbThread = new Thread(pb.startup);
|
||||||
pbThread.Name = pb.Name;
|
pbThread.Name = pb.Name;
|
||||||
pbThread.IsBackground = true;
|
pbThread.IsBackground = true;
|
||||||
|
|
||||||
pbThread.Start();
|
pbThread.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -67,7 +68,9 @@ namespace pCampBot
|
||||||
BotManager bm = new BotManager();
|
BotManager bm = new BotManager();
|
||||||
|
|
||||||
//startup specified number of bots. 1 is the default
|
//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)
|
while (true)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue