◐ Shell
clean mode source ↗

Stop non-main threads during interpreter finalization by youknowone · Pull Request #7349 · RustPython/RustPython

Raise SystemExit in check_signals() for non-main threads
once the finalizing flag is set. Without GIL, this serves
as the checkpoint where daemon threads detect shutdown,
analogous to CPython's _PyThreadState_MustExit in take_gil.

@youknowone marked this pull request as ready for review

March 4, 2026 16:43

youknowone added a commit to youknowone/RustPython that referenced this pull request

Mar 22, 2026
Raise SystemExit in check_signals() for non-main threads
once the finalizing flag is set. Without GIL, this serves
as the checkpoint where daemon threads detect shutdown,
analogous to CPython's _PyThreadState_MustExit in take_gil.