mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-87135: threading.Lock: Raise rather than hang on Python finalization (GH-135991)
After Python finalization gets to the point where no other thread can attach thread state, attempting to acquire a Python lock must hang. Raise PythonFinalizationError instead of hanging.
This commit is contained in:
parent
845263adc6
commit
fe119a0817
6 changed files with 97 additions and 5 deletions
|
@ -0,0 +1,3 @@
|
|||
Acquiring a :class:`threading.Lock` or :class:`threading.RLock` at interpreter
|
||||
shutdown will raise :exc:`PythonFinalizationError` if Python can determine
|
||||
that it would otherwise deadlock.
|
Loading…
Add table
Add a link
Reference in a new issue