Author vstinner
Recipients christian.heimes, docs@python, pitrou, vstinner
Date 2013-11-13.21:49:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384379370.85.0.232061958171.issue19576@psf.upfronthosting.co.za>
In-reply-to
Content
While working on a unit test for the issue #14432, I hit a bug. My C thread got the GIL with PyGILState_Ensure(), but it was strange because the main Python thread also had the GIL...

Then I saw that gil_created() returned false. The solution is to call PyEval_InitThreads() to create the GIL.

I was reading "Non-Python created threads" documentation, but this section doesn't mention PyEval_InitThreads().

I don't know if it's something new in Python 3.2 with the new GIL.
History
Date User Action Args
2013-11-13 21:49:30vstinnersetrecipients: + vstinner, pitrou, christian.heimes, docs@python
2013-11-13 21:49:30vstinnersetmessageid: <1384379370.85.0.232061958171.issue19576@psf.upfronthosting.co.za>
2013-11-13 21:49:30vstinnerlinkissue19576 messages
2013-11-13 21:49:30vstinnercreate