[SciPy-user] conforming to Python GIL...

Pearu Peterson pearu@cens.ioc...
Fri Apr 4 01:04:28 CDT 2008

On Thu, April 3, 2008 10:20 pm, fred wrote:
> Hi,
> I use a lot of ConVeX OPTimsation and fortran (via f2py) routines in my
> Traits app.
> As I want to compute the data and want to display them, I use threads.
> The issue I get is that data displayed (using Chaco2) are not updated
> (app is frozen) while computing the input data.
>  From D. Morrill's answer (the Traits guru ;-)), it appears that cvxopt
> (and solve() from scipy, in fact) and fortran modules does not release
> the "Python GIL (Global Intepreter Lock)".
> This is very bad to hear as the display is not updated (after a window
> popup, left blank, or one can't handle properties display data).
> Someone can gives an helping hand on this issue ?

Have you tried to use f2py `threadsafe` statement when wrapping
fortran code? With the `threadsafe` statement the fortran call
will be surrounded with Py_BEGIN_ALLOW_THREADS-Py_END_ALLOW_THREADS block.


More information about the SciPy-user mailing list