SIGN IN SIGN UP

gh-108724: Fix _PySemaphore_Wait call during thread deletion (#116483)

In general, when `_PyThreadState_GET()` is non-NULL then the current
thread is "attached", but there is a small window during
`PyThreadState_DeleteCurrent()` where that's not true:
tstate_delete_common() is called when the thread is detached, but before
current_fast_clear().

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
S
Sam Gross committed
3cdfdc07a9dd39bcd6855b8c104584f9c34624f2
Parent: 601f3a7
Committed by GitHub <noreply@github.com> on 3/8/2024, 8:26:36 PM