◐ Shell
clean mode source ↗

bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread by pablogsal · Pull Request #12541 · python/cpython

…an terminate the calling thread

vstinner

pitrou

@pablogsal

pablogsal added a commit to pablogsal/cpython that referenced this pull request

Apr 13, 2019
…sure can terminate the calling thread (pythonGH-12541)

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)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

pablogsal added a commit that referenced this pull request

Apr 14, 2019
…sure 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)