Hi all,

Yes, forgot to mention that that TimerMixin experiment would break if mixed-in with a threadedcomponent - in which situation using time.sleep() is far simpler and less heavyweight.

*if* it were to become core functionality of Kamaelia, then I'd envisage it being added to Component; and similar methods providing equivalent functionality being added to threadedcomponent.

Have just done another little experiment and made the mix-in work for both components and threadedcomponents.

http://code.google.com/p/kamaelia/source/browse/trunk/Sketches/MH/TimerMixIn2.py

It is not very clean - since the mix-in now has explicit knowledge about what it is mixing into. But as mentioned before - the time.sleep() method is probably better for threadedcomponents; plus if this were included in Kamaelia, it would be better placed in core Axon, where some changes to Component and ThreadedComponent would be made to allow it to be coded more cleanly.

regards



Matt
--
| Matt Hammond
| Research Engineer, BBC R&D, Centre House, London
| http://www.bbc.co.uk/rd/

--
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.

Reply via email to