Get the "Current" Thread State from a Thread-local
-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Closed
Closed
Labels
Description
(This is a revival of gh-84702, which @vstinner worked on several years ago.)
For a per-interpreter GIL (PEP 684) we need to start storing the "current" thread state in a thread-local variable, rather than _PyRuntime.tstate_current. There may be other benefits to the approach if we can take advantage of native compiler support (e.g. C11's __thread_local).
Also see https://discuss.python.org/t/how-to-get-the-current-thread-state/22655.
Linked PRs
Metadata
Metadata
Assignees
No one assigned
Labels
Fields
No fields configured for issues without a type.
Projects
No projects
Milestone
No milestone
Relationships
None yet
Development
No branches or pull requests