◐ Shell
clean mode source ↗

gh-87135: threading.Lock: Raise rather than hang on Python finalization by encukou · Pull Request #135991 · python/cpython

…lization

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.

colesbury

vstinner

@encukou encukou deleted the no-acquire-in-finalize branch

July 1, 2025 08:57

AndPuQing pushed a commit to AndPuQing/cpython that referenced this pull request

Jul 11, 2025
…lization (pythonGH-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.

Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request

Jul 12, 2025
…lization (pythonGH-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.

picnixz pushed a commit to picnixz/cpython that referenced this pull request

Jul 13, 2025
…lization (pythonGH-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.

taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request

Aug 4, 2025
…lization (pythonGH-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.

Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request

Aug 19, 2025
…lization (pythonGH-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.