[Tutor] Threading in Python

James jtp at nc.rr.com
Thu Sep 20 03:23:24 CEST 2007

Hi.  :)

I have a question regarding threading in Python.  I'm trying to write  
a wrapper script in Python that will spin off multiple (lots!) of  
instances of an I/O benchmark/testing utility.  I'm very interested  
in doing this in Python, but am unsure if this is a good idea.  I  
thought I read somewhere online that because of the way Python was  
written, even if I spun off (forked off?) multiple instances of a  
program, all those child processes would be restricted to one CPU.   
Is this true?

I'm not sure if the utility I'm forking is CPU-intensive; it may very  
well be.  Does Python indeed have this limitation?

Also, should I be using os.fork() for this kind of program?

Thoughts/ideas appreciated.  :)


More information about the Tutor mailing list