[SciPy-user] conforming to Python GIL...
Travis E. Oliphant
Thu Apr 3 14:44:43 CDT 2008
> 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 requires a bit of effort to solve. We need to in multiple places...
1) release the GIL
2) put semaphores into code that is not thread-safe.
f2py should be modified to handle this. Other could should be
modified to handle it as well.
I suspect NumPy should grow an API to handle the semaphore thing easily
(I think Python already has one), so these may be able to be wrapped
into the MACROS already available for releasing the GIL.
More information about the SciPy-user