[Pogamut-list] Graceful stopping

jakub.gemrot pogamut-forum at diana.ms.mff.cuni.cz
Sat Dec 18 10:10:14 CET 2010


Re: Graceful stopping

Author: jakub.gemrot

Hi!

Graceful stopping is not as easy thing as one would like. In Pogamut 2 there was even a possibility that the agent would not stop (or fail in a horrible way).
Current way is much better as it guaranteeing that the agent will actualy stop, ... always.

The biggest problem is that anybody may call stop/kill anytime. And then you will try to stop components in some order. So there is a possiblity that
one component will still work while the other one will be stopping. Thus if Mediator pass a message to a WorldView when WorldView is currently stopping,
it can't result in anything else than an exception. Nevertheless I might try to improve this mechanism, but currently it does not making much sense. 

Perhaps it would be beneficial, if you describe several scenarios when bot.stop() results in an exception. I mean, it should not happen and
and I would consider such behavior as a bug.

Cheers!
Jimmy

P.S.: the worst case that can happen when bot is stopping is that internally it will raise "ComponentNotRunningException" but this exception should not bubble up to the bot.stop() method
because it is just inner-signal that the bot is stopping thus when some component receives it, it should just stop itself.

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=487&post_reply=1#form>





More information about the Pogamut-list mailing list