Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move interned dictionary to global runtime state #96075

Closed
kumaraditya303 opened this issue Aug 18, 2022 · 1 comment
Closed

Move interned dictionary to global runtime state #96075

kumaraditya303 opened this issue Aug 18, 2022 · 1 comment
Assignees
Labels
3.12 bugs and security fixes topic-subinterpreters

Comments

@kumaraditya303
Copy link
Contributor

As part of the subinterpreter efforts, all the runtime state which is global should be under single global variable rather than static variables in random C source files. Since interned dict must be global and not per-interpreter it should be moved to _PyRuntime. We would likely add a lock around accessing and make it immortal for interpreter GIL but that's for a different PR.

@kumaraditya303
Copy link
Contributor Author

Fixed by #96077

Repository owner moved this from In Progress to Done in Subinterpreters Aug 23, 2022
ericsnowcurrently added a commit that referenced this issue Dec 14, 2022
* move _PyRuntime.global_objects.interned to _PyRuntime.cached_objects.interned_strings (and use _Py_CACHED_OBJECT())
* rename _PyRuntime.global_objects to _PyRuntime.static_objects

(This also relates to gh-96075.)

#90111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes topic-subinterpreters
Projects
Status: Done
Development

No branches or pull requests

1 participant