Michael,

Thank you for taking the time to review this.  I can see 1001
different ways to skin .... err bad metaphor for a cat logo
framework.  But the point is, I would like to get familiar with how to
program with Kamaelia in a style the meshes with the least impedance.

> and why I think you're doing it, and whilst what you're doing isn't
> necessarily the way I would do it, so far it all makes sense.

Please don't hesitate to suggest how you would go about doing it.
Working through technical details is fine, but I want to learn the
best style as well as just getting a working solution.

> One very odd thing which jumps out at me though is this:
>             yield 1
>             yield 1
>
> Why the double yields ?

Yes, that is indeed unusual.  I was struggling a lot with getting
components to shutdown when I tell them.  The cascading conditionals
is one result.  A generic wrapper doesn't really know what message to
send to make the child reliably shutdown.  So I get progressively
ruder in asking it to shutdown: producerFinished ->
shutdownMicroprocess -> serverShutdown -> shutdown -> .stop().

After implementing this cascade, I thought I was still seeing cases
where a component was reaching a rather rude level, shutdown, when a
more polite producerShutdown should have been sufficient.  I was
looking at some of my own components and realized that I had cases
where, upon receiving a message on "control", the component would
perform a couple actions and yield once before performing final
cleanup and exiting.

So I posited that perhaps other components might need more than one
bounce on the scheduler trampoline before they were able to stop
cleanly.  The simplest idea that came to mind was to yield two or
three times after each increasingly urget shutdown message before the
next check as to whether the child had indeed stopped.  Basically I'm
trying to get the child to shutdown in as gentle a manner as possible,
but within bounded time (or cycles on the scheduler).

I hope that makes sense.

--Steve

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"kamaelia" group.
To post to this group, send email to kamaelia@googlegroups.com
To unsubscribe from this group, send email to 
kamaelia+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/kamaelia?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to