Threaded for loop

skip at pobox.com skip at pobox.com
Sun Jan 14 09:59:12 EST 2007


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

It will help if parts are I/O bound, presuming the threads which block
release the global interpreter lock (GIL).

There is a module in development (processing.py) that provides an API like
the threading module but that uses processes under the covers:

    http://mail.python.org/pipermail/python-dev/2006-October/069297.html

You might find that an interesting alternative.

Skip




More information about the Python-list mailing list