[issue19576] "Non-Python created threads" documentation doesn't mention PyEval_InitThreads()

STINNER Victor report at bugs.python.org
Wed Nov 13 22:49:30 CET 2013


New submission from STINNER Victor:

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.

----------
assignee: docs at python
components: Documentation
messages: 202787
nosy: christian.heimes, docs at python, haypo, pitrou
priority: normal
severity: normal
status: open
title: "Non-Python created threads" documentation doesn't mention PyEval_InitThreads()
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19576>
_______________________________________


More information about the Python-bugs-list mailing list