Audit all built-in modules for thread safety #116738
Labels
extension-modules
C modules in the Modules dir
topic-free-threading
type-feature
A feature request or enhancement
Feature or enhancement
Proposal:
After gh-116322 is done, and before we do gh-116329, we'll need to make sure that all built-in modules (or at least the ones that are loaded by most programs) are tagged as not using the GIL, by setting their
Py_mod_gilmodule slot toPy_MOD_GIL_NOT_USED. If we don't, the GIL will effectively still be enabled by default, since loading any untagged module will enable it.I expect a lot of modules will require little to no work; I'll create separate issues for any that are nontrivial.
Open Issues
_warnings.cthread-safe in free-threaded build #116664_threadmodule.cthread-safe in--disable-gilbuilds #114271Completed Issues
Completed Issues
_structmodule thread-safe in--disable-gilbuilds #112062defaulttimeoutin free-threaded build #116616Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://peps.python.org/pep-0703/, especially this section
The text was updated successfully, but these errors were encountered: