help with threads

Piet van Oostrum piet at cs.uu.nl
Sat Aug 8 02:03:54 CEST 2009


>>>>> Michael Mossey <michaelmossey at gmail.com> (MM) wrote:

>MM> Ah yes, that explains it. Some of these long computations are done in
>MM> pure C, so I'm sure the GIL is not being released.

Is that C code under your own control? Or at least the glue from Python
to C? In that case, and if the C code is not manipulating Python objects
or something in the Python interpreter, it could be changed to release
the GIL during the computation. That's also how Numpy does it, IIRC.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list