Closed GoogleCodeExporter closed 8 years ago
This has morphed into
"Design API to smoothly operate multiple bots"
cases:
1. I have a thread per bot
2. I have one thread that runs multiple bots, changing willy nilly
3. I have one thread, but I would like to set a current bot and nto
have to keep passsing the botid
Original comment by anneogb...@gmail.com
on 11 May 2012 at 5:18
http://code.google.com/p/opensim4opencog/source/detail?r=2807
case:
1. I have a thread per bot
%------------------------------------------------------------------------------
% much code uses botClient(Me) like botClientCmd and say/n
%
% so current_bot(Me) is checked by botClient(Me) and is a thread_local predicate
%
% usage:
% set_current_bot(Me), ..... unset_current_bot(Me)
%
% bug prone antipattern, but it's supported:
% current_bot(OldBot), set_current_bot(Me) ..... set_current_bot(OldBot)
% though current_bot(OldBot) may throw if not bot is set
% ------------------------------------------------------------------------------
case:
2. I have one thread that runs multiple bots, changing willy nilly
3. I have one thread, but I would like to set a current bot and nto
have to keep passing the botid
uses: current_bot(BotID)
botClientCmd(In)
botClientCmd(In,Out)
botClientCmd(In,WriteDelegate,Out)
at_botClientCmd(BotID,In)
at_botClientCmd(BotID,In,Out)
at_botClientCmd(BotID,In,WriteDelegate,Out)
Original comment by logicmoo@gmail.com
on 14 May 2012 at 12:15
Original issue reported on code.google.com by
anneogb...@gmail.com
on 10 May 2012 at 4:07