SIGN IN SIGN UP

[3.13] gh-119369: Fix deadlock during thread exit in free-threaded build (GH-119528) (#119868)

Release the GIL before calling `_Py_qsbr_unregister`.

The deadlock could occur when the GIL was enabled at runtime. The
`_Py_qsbr_unregister` call might block while holding the GIL because the
thread state was not active, but the GIL was still held.
(cherry picked from commit 078b8c8cf2bf68f7484cc4d2e3dd74b6fab55664)

Co-authored-by: Sam Gross <colesbury@gmail.com>
M
Miss Islington (bot) committed
a7e81fdfc175bd9cf82dfd8f1e1853cb942bf0f0
Parent: 5e8396e
Committed by GitHub <noreply@github.com> on 5/31/2024, 6:19:38 PM