Comparing python:main...encukou:no-join-in-finalize-ever · python/cpython (original) (raw)
Checking mergeability… Don’t worry, you can still create the pull request.
- 6 commits
- 6 files changed
- 1 contributor
Commits on Feb 20, 2025
- gh-87135: Raise PythonFinalizationError when joining a blocked daemon…
… thread
IfPy_IsFinalizing()
is true, non-daemon threads (other than the current one)
are done, and daemon threads are prevented from running, so they
cannot finalize themselves and become done. Joining them without timeout
would block forever.
Raise PythonFinalizationError instead of hanging.
See gh-123940 for a use case: callingjoin()
from__del__
. This is
ill-advised, but an exception should at least make it easier to diagnose.
Configuration menu
Browse the repository at this point in the history