Ignore the CriticalLock commit; this was an idea that didn't work and was prone to deadlock.
Ignore the weakrefs change.
Unclear if we need to deal with _tstate_lock.
For the other changes, use your judgement. You may be able to put together smaller changes
_Py_ThreadId() is currently only available in the free-threaded build, so the recursive lock implementation can probably (?) just stick with the existing PyThread_get_thread_ident().
Activity
mpage commented on Jan 19, 2024
@colesbury - Would you assign this to me, please?
Merge branch 'main' into pythongh-114271-remove-tstate_lock
gh-114271: Make `PyInterpreterState.threads.count` thread-safe in fre…
pythongh-114271: Make `PyInterpreterState.threads.count` thread-safe …
Merge branch 'main' into pythongh-114271-remove-tstate_lock
Merge branch 'main' into pythongh-114271-remove-tstate_lock
Merge branch 'main' into pythongh-114271-remove-tstate_lock
Merge branch 'main' into pythongh-114271-_thread-ThreadHandle
Merge branch 'pythongh-114271-_thread-ThreadHandle' into pythongh-11427…
gh-114271: Make `thread._rlock` thread-safe in free-threaded builds (#…
gh-114271: Make `_thread.ThreadHandle` thread-safe in free-threaded b…
pythongh-114271: Make `thread._rlock` thread-safe in free-threaded bu…
15 remaining items
pythongh-114271: Fix race in `Thread.join()` (python#114839)
pythongh-114271: Make `_thread.ThreadHandle` thread-safe in free-thre…
pythongh-114271: Make `_thread.lock` thread-safe in free-threaded bui…
pythongh-114271: Fix race in `Thread.join()` (python#114839)
colesbury commented on Apr 10, 2024
@mpage is this complete?
mpage commented on Apr 10, 2024
Yep. I filed #117721 to track the follow up work we discussed for _thread.lock.release().
pythongh-114271: Make `thread._rlock` thread-safe in free-threaded bu…
pythongh-114271: Make `_thread.ThreadHandle` thread-safe in free-thre…
pythongh-114271: Make `_thread.lock` thread-safe in free-threaded bui…
pythongh-114271: Fix race in `Thread.join()` (python#114839)
_tstate_lock was removed in Python 3.13
_tstate_lock was removed in Python 3.13
Python 3.13 Support (#988)
pythongh-114271: Make `thread._rlock` thread-safe in free-threaded bu…