]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can termina...
authorPablo Galindo <Pablogsal@gmail.com>
Sun, 14 Apr 2019 02:49:17 +0000 (03:49 +0100)
committerGitHub <noreply@github.com>
Sun, 14 Apr 2019 02:49:17 +0000 (03:49 +0100)
commit7723d0545c3369e1b2601b207c250c70ce90b75e
tree0522bbe128a1692cb45ebd522f6f0820c56391ae
parentf3a9d722d77753f5110e35f46bd61732c0cb81c1
[3.7] bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread (GH-12541) (GH-12820)

Calling these function from a thread when the runtime is finalizing will terminate
the thread, even if the thread was not created by Python. Users can use
_Py_IsFinalizing or sys.is_finalizing to check if the interpreter is in the process of
being finalized before calling this function to avoid unwanted termination.
(cherry picked from commit fde9b33)
Doc/c-api/init.rst