Threaded for loop

Paul Rubin http
Sun Jan 14 03:59:38 EST 2007


"John" <weekender_ny at yahoo.com> writes:
> Damn! That is bad news. So even if caclulate is independent for
> (i,j) and is computable on separate CPUs (parts of it are CPU bound,
> parts are IO bound) python cant take advantage of this?

Not at the moment, unless you write C extensions that release the
global interpreter lock (GIL).  One of these days.  Meanwhile there
are various extension modules that let you use multiple processes,
look up POSH and Pyro.



More information about the Python-list mailing list