tzickel added the comment:
I think that the document regarding PyGILState_Ensure and PyEval_InitThreads
should be clarified better, written in issue #26003
--
nosy: +tzickel
___
Python tracker
Jiong Du added the comment:
this patch made a new issue20891
--
nosy: +lolynx
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19576
___
___
STINNER Victor added the comment:
So Antoine, what do you think of the fix?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19576
___
___
Antoine Pitrou added the comment:
Looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19576
___
___
Python-bugs-list mailing list
Roundup Robot added the comment:
New changeset dc4e805ec68a by Victor Stinner in branch 'default':
Close #19576: PyGILState_Ensure() now initializes threads. At startup, Python
http://hg.python.org/cpython/rev/dc4e805ec68a
--
nosy: +python-dev
resolution: - fixed
stage: -
STINNER Victor added the comment:
Perhaps we can fix PyGILState to call PyEval_InitThreads automatically?
Yes, I had the same idea. Here is a patch to call PyEval_InitThreads() in
PyGILState_Ensure() for new threads.
--
keywords: +patch
Added file:
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
Antoine Pitrou added the comment:
Perhaps we can fix PyGILState to call PyEval_InitThreads automatically?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19576
___