Commit fde9b33
authored
bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure 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.1 parent 46544f6 commit fde9b33
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
859 | 865 | | |
860 | 866 | | |
861 | 867 | | |
| |||
903 | 909 | | |
904 | 910 | | |
905 | 911 | | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
906 | 918 | | |
907 | 919 | | |
908 | 920 | | |
| |||
0 commit comments