gh-115103: Fix unregistering of QSBR state by colesbury · Pull Request #116480 · python/cpython
If a thread blocks while waiting on the `shared->mutex` lock, the array of QSBR states may be reallocated. The `tstate->qsbr` values before the lock is acquired may not be the same as the value after the lock is acquired.
colesbury added a commit to colesbury/cpython that referenced this pull request
Mar 7, 2024In 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(). This updates _PySemaphore_Wait() to handle that case.
adorilson pushed a commit to adorilson/cpython that referenced this pull request
Mar 25, 2024diegorusso pushed a commit to diegorusso/cpython that referenced this pull request
Apr 17, 2024This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters