Python threading?

Aahz aahz at
Mon Sep 23 21:55:30 EDT 2002

In article <f9Pi9.10275$Lg2.2191294 at>,
Robert Oschler <Oschler at> wrote:
>Also, what is a reasonable number of threads to expect to be able to run
>before context switching overhead becomes a problem (I'm using a PIII 500
>Mhz with 512MB ram if that helps).

It depends.  For pure Python-based computation, more than one thread
will cost you more than you gain.  If it's almost pure I/O (file or
socket stuff), you might be able to use as many as a couple of hundred
threads.  Mostly, you're probably best off somewhere between five and
thirty threads, depending on what you're doing.
Aahz (aahz at           <*>

Project Vote Smart:

More information about the Python-list mailing list