[Twisted-Python] Flow, generators, coroutines etc.
Dominic Fox
dominic.fox at gmail.com
Sun May 28 04:45:22 MDT 2006
I understand that twisted.flow is no longer maintained, and is not
widely considered to represent a good way of writing twisted code.
However, I haven't been able to find any explanation of why this
approach (using generators to simulate co-operative multitasking)
seems to have been abandoned.
Is it simply the case that most people writing twisted code didn't
find it very useful? Or are there more specific arguments against
doing things that way?
I'm trying to make the case at work for using twisted for networking
things (in spite of my preference for lightweight threads plus
sensible concurrency primitives, if Python is the target platform then
twisted is probably the best way to go).
If I can show some full-threaded code next to some co-operative
multitasking code that a) has much the same sort of control flow, but
b) scales much better, and doesn't have to worry about subtle
concurrency issues, then I think it should go fairly well. If I have
to explain about how the event-driven programming model works at the
same time, it might not go *so* well...
Dominic
More information about the Twisted-Python
mailing list