python threads on multi-CPU machines

Andrew Dalke adalke at mindspring.com
Mon Aug 18 05:26:21 EDT 2003


Thomas Womack:
> If I have a dual-processor hyperthreaded machine (so with four CPU
> contexts), will a python program distribute threads over all four
> logical processors?

Yes, unless you are CPU bound in the Python interpreter.
(CPU bound in an extension is fine, and I/O bound, as when
doing network is also fine.)

For a longer answer, see back threads concerning the global
interpreter lock and "free-threading".

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list