-
Notifications
You must be signed in to change notification settings - Fork 44
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
Feature add atomics #592
Feature add atomics #592
Conversation
… that defaults to memory_order_relaxed.
…I (this is not a correctness issue, it has to do with how non-atomic things behave in multithreaded environment.)
Codecov Report
@@ Coverage Diff @@
## develop #592 +/- ##
=========================================
+ Coverage 93.7% 93.7% +<.1%
=========================================
Files 377 381 +4
Lines 17665 17805 +140
=========================================
+ Hits 16554 16687 +133
- Misses 1111 1118 +7 |
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.
@timmah This looks really good. I have a couple of nit-picky changes that I want to see added before it is merged.
@atom @alexrlongne Can either of you review this PR?
@KineticTheory I agree with your suggestions, otherwise this looks good to me! I think it's great that the standard has this level of control for atomics. I don't quite understand why they don't provide these kinds of basic operations on atomic types. |
I want to add a test of fetch_sub, maybe hold off before merging. OK--added a test of fetch_sub (which revealed a mistake--woot) |
This looks reasonable to me. I assume there's no problem using compare_exchange_weak instead of strong? |
Background
Purpose of Pull Request
Description of changes
Status