-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-127314: Don't mention the GIL when calling without a thread state on the free-threaded build #127315
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
gh-127314: Don't mention the GIL when calling without a thread state on the free-threaded build #127315
Conversation
Co-authored-by: Victor Stinner <[email protected]>
Apologies for the notification spam with the commits, I'm a bit on the go right now so I had to do it from GH. It's all updated now. |
Co-authored-by: Victor Stinner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I like "active thread state" for Free Threading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well
Merged, thank you. |
…state on the free-threaded build (python#127315) Co-authored-by: Victor Stinner <[email protected]>
Releasing the thread state via
Py_BEGIN_ALLOW_THREADS
can be confusing for users on free-threading, because the common error messages that come up mention that the GIL must be held, but that won't make sense if it's disabled.(Technically, the part of the new message mentioning
Py_BEGIN_ALLOW_THREADS
is true for the default build as well, but I don't see enough justification to change it there too.)NULL
thread state on the free-threaded build #127314