Repository navigation
Make _threadmodule.c thread-safe in --disable-gil builds #114271
Copy link
Copy link
Closed
Labels
Description
Activity
- addedtype-featureA feature request or enhancementA feature request or enhancement
on Jan 18, 2024 @colesbury - Would you assign this to me, please?
Reacted by Sam Gross- added a commit that references this issue
on Feb 5, 2024 - added a commit that references this issue
on Feb 12, 2024 - added 5 commits that reference this issue
on Feb 16, 2024 - added a commit that references this issue
on Feb 16, 2024 - added a commit that references this issue
on Mar 1, 2024 15 remaining items
@mpage is this complete?
Yep. I filed #117721 to track the follow up work we discussed for
_thread.lock.release().- added 4 commits that reference this issue
on Apr 17, 2024 - added 2 commits that reference this issue
on Nov 7, 2024
Feature or enhancement
Proposal:
Make the functionality in
_threadmodule.cthread-safe in free-threaded builds.Commits from nogil-3.12: https://github.com/colesbury/nogil-3.12/commits/nogil-3.12/Modules/_threadmodule.c
Context from @colesbury:
_Py_ThreadId()is currently only available in the free-threaded build, so the recursive lock implementation can probably (?) just stick with the existingPyThread_get_thread_ident().Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
Thread.join()#114839PyInterpreterState.threads.countthread-safe in free-threaded builds #115093thread._rlockthread-safe in free-threaded builds #115102_thread.ThreadHandlethread-safe in free-threaded builds #115190_thread.lockthread-safe in free-threaded builds #116433