]> granicus.if.org Git - python/commit
Add more checks on the GIL
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 14 Mar 2016 21:07:55 +0000 (22:07 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 14 Mar 2016 21:07:55 +0000 (22:07 +0100)
commit8a1be61849341528c866924cf69d378ce7790889
tree0b59fbc22edbd703ded539758aae78382d4eec7d
parent08572f68a980576e883e4eba1227b59782d5192e
Add more checks on the GIL

Issue #10915, #15751, #26558:

* PyGILState_Check() now returns 1 (success) before the creation of the GIL and
  after the destruction of the GIL. It allows to use the function early in
  Python initialization and late in Python finalization.
* Add a flag to disable PyGILState_Check(). Disable PyGILState_Check() when
  Py_NewInterpreter() is called
* Add assert(PyGILState_Check()) to: _Py_dup(), _Py_fstat(), _Py_read()
  and _Py_write()
Include/pystate.h
Parser/pgenmain.c
Python/fileutils.c
Python/pylifecycle.c
Python/pystate.c