Python threading?
Aahz
aahz at pythoncraft.com
Mon Sep 23 21:55:30 EDT 2002
In article <f9Pi9.10275$Lg2.2191294 at news2.news.adelphia.net>,
Robert Oschler <Oschler at earthlink.net> 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 pythoncraft.com) <*> http://www.pythoncraft.com/
Project Vote Smart: http://www.vote-smart.org/
More information about the Python-list
mailing list