By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,441 Members | 1,488 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,441 IT Pros & Developers. It's quick & easy.

recursive acquire of GIL

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <bf**************************@posting.google.com >,
pc******@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
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.