[Pogamut-list] Exceptions generated when bots start at same or near same time
pogamut-forum at diana.ms.mff.cuni.cz
pogamut-forum at diana.ms.mff.cuni.cz
Thu Apr 29 12:11:30 CEST 2010
Re: Exceptions generated when bots start at same or near same time
Author:
Its very simple to recreate. I start two thread (or more) after each other with the following in their run() method:
int serverPort = BotSetup.INSTANCE.getDummyServerPort();
UT2004BotModule myModule = new UT2004BotModule(DummyBot.class);
UT2004BotFactory factory = new UT2004BotFactory(myModule);
UT2004BotRunner botRunner = new UT2004BotRunner(factory, "DummyBot", "localhost", serverPort);
IAgent agent = botRunner.startAgent();
// wait until the bot finishes and close Pogamut platform
new WaitForAgentStateChange(agent.getState(), IAgentStateStopped.class).await();
Pogamut.getPlatform().close();
If I want it to run functional I just make 1500 miliseconds pass before starting the next thread. Found out with 1000 milli seconds it would still generate bug some times.
--
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=125&post_reply=1#form>
More information about the Pogamut-list
mailing list