You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ensure current thread state is cleared before deleting it in _PyThreadState_DeleteCurrent #116515
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():
I think it's worth swapping the order of the calls so that we call current_fast_clear before tstate_delete_common. This would also make the order of operations in PyThreadState_DeleteCurrent() more similar to the order used when calling PyThreadState_Delete().
Activity
pythongh-116515: Clear thread-local state before tstate_delete_common()
gh-116515: Clear thread-local state before tstate_delete_common() (#1…
pythongh-116515: Clear thread-local state before tstate_delete_common…
pythongh-116515: Clear thread-local state before tstate_delete_common…