recursive acquire of GIL

Just just at xs4all.nl
Thu Apr 1 11:30:40 EST 2004


In article <bfef2a62.0404010704.36c068d3 at posting.google.com>,
 pcaffrey at iel.ie (Paul) wrote:

> I have seen this discussed already on the newgroup but 
> have not seen if the problem is solved
> 
> Using embedded python in c++ we use
>     PyEval_RestoreThread(context);
> to acquire the GIL.
> 
> We then use swig to call back into c++ which again 
> calls out to python
> Essentially we have
> c++ -> python -> c++ -> python
> 
> The second RestoreThread uses a different python context of course.
> However it hangs
> 
>     PyEval_RestoreThread(context2);
> is hanging.
> 
> We're using python 2.2.1
> 
> Has a solution to this been added to later versions?

I think PEP 311 solved this in 2.3:
  http://www.python.org/peps/pep-0311.html

Just



More information about the Python-list mailing list