On 08/10/2010 10:38 PM, Michael Sparks wrote:
[giant snip]
Many many thank yous. I understood everything you posted, and it is very
close to what I had in mind to write, only cleaner :) It is great to be
back here. I spent the afternoon reading code comments, and it felt like
attending a well organized, fantastic course. The analogy with the shell
operations strikes me as brilliant every time I see it.
With this really fascinating startup project I am working on, I also
have the added complexity of having weighted values which may determine
which component is executed based on probabilities. It would be
wonderful to have a third type of topology, to accompany the PAR and
SEQ, called WGT or PROB, or something, which will run the component with
the highest weighted value. I know, I could write it myself, but it
would be awesome to just have it all :)
Finally, I've been doing a fair amount of time related work using kamaelia
recently, and I'm very much of the opinion that using time.sleep inside a
threaded component is by far and away the most simple thing to do.
Hope that all helps,
The timer solution makes sense. I wrote timer code which looks almost
exactly like Matt's timer class. I pass it through a series of
components, where one happens to be a threadedcomponent, and it breaks.
This solution is fool-proof.
Matt: Please try this with your code, self.link() it to a chain of
components where one is threaded, or run the entire chain with a
scheduler.run.runThreads() call, and let me know what you see. My code
is very very similar to yours and fails after the timer is fired. I
cannot cancel the timer, I cannot control it at all, as if I have lost
control of the thread. A thread inside a thread is just craziness. :)
You both rock. Never stop.
Gloria
--
You received this message because you are subscribed to the Google Groups
"kamaelia" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/kamaelia?hl=en.