recursive acquire of GIL

P

Paul

Hi

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?

Regards

Paul
 
J

Just

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top