[Tutor] Threading...

A.T.Hofkamp a.t.hofkamp at tue.nl
Mon Apr 27 08:46:35 CEST 2009

Spencer Parker wrote:
> Would the best route for this be
> threading? or is there another way to go about it?

At #python, you'd quickly get redirected away from threading (you are making a 
IO-bound app, so threading doesn't buy you anything in performance and gives a 
big headache in data protection), towards Twisted, a Python framework designed 
for programming asynchronous (network) applications (ie IO-bound applications 
with many IO connections, like yours).

I do think that ultimately, you are better of with Twisted than with threading 
(until some Pythoneers extend the language with concurrency primitives that 
don't give you data protection problems as a bonus).
However, Twisted is also quite twisted in nature. It takes a some time before 
you understand how to program in it.


More information about the Tutor mailing list