-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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-115041: Add wrappers that are atomic only in free-threaded builds #115046
Conversation
These are intended to be used in places where atomics are required in free-threaded builds, but not in the default build, and we don't want to introduce the potential performance overhead of an atomic operation in the default build.
@corona10 @colesbury - Would you please have a look? I ended up using macros after trying experimenting with some of the changes from #114843. |
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.
For the naming, I will delegate to @colesbury
2 things:
- If the change does not affect to end-user side, we don't add news.d normally :)
- You may need to update pythoncore.vcxproj and pythoncore.vcxproj.filters for newly added headers.
One of the CI signals will fail without either a NEWS entry or the "skip news" label. I haven't been able to figure out how to add the "skip news" label; I suspect that I'm missing some permissions. I don't feel great about asking folks to review changes with a failing CI signal, even if it's benign, so I've been adding a NEWS entry. Do you know if it would be possible to give me (and other Cinder folks who aren't core devs) permission to add "skip news"? |
You should be promoted to triager, at least. |
@colesbury - Would you please take a look at this? This is the last thing we need to sort out before we can merge #113830. |
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.
Thanks for doing this Matt. Looks good, but a few things need to be done:
- Fix the merge conflict in Makefile.pre.in
- Add the header to
pythoncore.vcxproj
andpythoncore.vcxproj.filters
- Probably remove the NEWS file based on @corona10's comments
On (2), my strategy is usually to search for references to a nearby header (e.g., pycore_pyarena.h
) in PCbuild/
and use the search results to figure out where to add the references to the new header.
bfe4934
to
b44e1ab
Compare
@colesbury @corona10 - I think this should be good to go now. Would you please take a look? |
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.
This LGTM. @corona10 did you want to look over this as well?
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!
These are intended to be used in places where atomics are required in free-threaded builds, but not in the default build, and we don't want to introduce the potential performance overhead of an atomic operation in the default build.