Please help with Threading

Fábio Santos fabiosantosart at gmail.com
Mon May 20 02:25:17 EDT 2013


On 18 May 2013 20:33, "Dennis Lee Bieber" <wlfraed at ix.netcom.com> wrote:
>         Python threads work fine if the threads either rely on intelligent
> DLLs for number crunching (instead of doing nested Python loops to
> process a numeric array you pass it to something like NumPy which
> releases the GIL while crunching a copy of the array) or they do lots of
> I/O and have to wait for I/O devices (while one thread is waiting for
> the write/read operation to complete, another thread can do some number
> crunching).

Has nobody thought of a context manager to allow a part of your code to
free up the GIL? I think the GIL is not inherently bad, but if it poses a
problem at times, there should be a way to get it out of your... Way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130520/7b6bd7f3/attachment.html>


More information about the Python-list mailing list