Skip to content

gh-59956: Allow the "Trashcan" Mechanism to Work Without a Thread State#101209

Merged
ericsnowcurrently merged 2 commits intopython:mainfrom
ericsnowcurrently:trashcan-struct
Jan 23, 2023
Merged

gh-59956: Allow the "Trashcan" Mechanism to Work Without a Thread State#101209
ericsnowcurrently merged 2 commits intopython:mainfrom
ericsnowcurrently:trashcan-struct

Conversation

@ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Jan 21, 2023

We've factored out a struct from the two PyThreadState fields. This accomplishes two things:

  • make it clear that the trashcan-related code doesn't need any other parts of PyThreadState
  • allows us to use the trashcan mechanism even when there isn't a "current" thread state

We still expect the caller to hold the GIL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants