]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40226: PyInterpreterState_Delete() deletes pending calls (GH-19436)
authorVictor Stinner <vstinner@python.org>
Wed, 8 Apr 2020 15:54:59 +0000 (17:54 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Apr 2020 15:54:59 +0000 (17:54 +0200)
commitdda5d6e071c6a9d65993d45b90232565cfad2cde
treee5c629500c9557ecad3113054a019fc4af19f93a
parentac2cfe6631b77a2005d8f16f034dbb6154f04ab2
bpo-40226: PyInterpreterState_Delete() deletes pending calls (GH-19436)

PyInterpreterState_New() is now responsible to create pending calls,
PyInterpreterState_Delete() now deletes pending calls.

* Rename _PyEval_InitThreads() to _PyEval_InitGIL() and rename
  _PyEval_InitGIL() to _PyEval_FiniGIL().
* _PyEval_InitState() and PyEval_FiniState() now create and delete
  pending calls. _PyEval_InitState() now returns -1 on memory
  allocation failure.
* Add init_interp_create_gil() helper function: code shared by
  Py_NewInterpreter() and Py_InitializeFromConfig().
* init_interp_create_gil() now also calls _PyEval_FiniGIL(),
  _PyEval_InitGIL() and _PyGILState_Init() in subinterpreters, but
  these functions now do nothing when called from a subinterpreter.
Include/internal/pycore_ceval.h
Python/ceval.c
Python/pylifecycle.c
Python/pystate.c