[Twisted-Python] PEP 342 & cooperative threads
Antoine Pitrou
solipsis at pitrou.net
Thu Aug 18 05:05:22 EDT 2005
Le jeudi 18 août 2005 à 16:05 +1000, Christopher Armstrong a écrit :
> That's Kam*a*elia, unless you really are talking about a porn star. :)
> (googling "kamelia python" was pretty interesting).
Thanks!
I didn't know Kamaelia. According to the simple example given here
(http://kamaelia.sourceforge.net/Docs/Axon.html), the programming
paradigm is not quite the same: with Kamaelia you explicitly link
producers and consumers together, whereas in my approach you just wait
on the shared object that represents the communication channel (this
object can be used by more than one reader and one writer, by the way).
This means a cooperative thread is more self-contained and doesn't need
external logic to be linked to other threads.
If you want a point of comparison, my approach is similar to that of
gtasklets (http://www.gnome.org/~gjc/gtasklet/gtasklets.html), except
that I don't use GTK at all - everything is done in plain Python.
regards
Antoine.
More information about the Twisted-Python
mailing list