thread. question

Tim Wintle tim.wintle at teamrubber.com
Fri Feb 13 09:33:49 CET 2009


On Mon, 2009-02-09 at 21:02 +0100, Christian Heimes wrote:
> The module was renamed to _thread to stop people from using it directly.
> The extension module is the interface to some low level types and
> functions. Especially the usage of thread.start_new_thread is
> problematic, since it bypasses Python's high level threading API.

Ok, I'll take that in - I'll have a look around the threading module to
see what it is that it bypasses so I can persuade myself that _thread is
bad ...

> For the rest I have to agree with Jean-Paul. If you need performance
> don't use threads! Threads and performance are orthogonal -- sometimes
> they are even contradictorily.

I've taken that in too - "performance" here is over a non-uniform
workload (essentially a web server), but I'm probably best offloading
just about all the work to a secondary process (already passed most of
it) and dealing with requests in a completely synchronous process.

Tim




More information about the Python-list mailing list