dual CPU-mode in python
Steve Holden
steve at holdenweb.com
Sun Mar 5 11:54:03 EST 2006
Astan Chee wrote:
> Hi,
> I have a python script which i convert to an executeable (using py2exe)
> and on a dual-cpu machine seems to be taking only 50% (1cpu) only. I was
> wondering if there is a way to maximize CPU usage without forking the
> function?
> Thanks
Python has a global interpreter lock (GIL) that inhibits parallelism.
Certain extensions will clear the lock, but generally speaking you will
need to generate multiple processes to take full advantage of parallel
hardware.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd www.holdenweb.com
Love me, love my blog holdenweb.blogspot.com
More information about the Python-list
mailing list