gh-116522: Refactor `_PyThreadState_DeleteExcept` (#117131)
Split `_PyThreadState_DeleteExcept` into two functions: - `_PyThreadState_RemoveExcept` removes all thread states other than one passed as an argument. It returns the removed thread states as a linked list. - `_PyThreadState_DeleteList` deletes those dead thread states. It may call destructors, so we want to "start the world" before calling `_PyThreadState_DeleteList` to avoid potential deadlocks.
S
Sam Gross committed
1f72fb5447ef3f8892b4a7a6213522579c618e8e
Parent: 50369e6
Committed by GitHub <[email protected]>
on 3/21/2024, 6:21:02 PM