Skip to content

Replace Interlocked.{Compare}Exchange Int32 overloads with generic <bool> variants #9480

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

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

h3xds1nz
Copy link
Member

@h3xds1nz h3xds1nz commented Jul 28, 2024

Description

As dotnet/runtime - #65184 was approved last week and changes were made in the runtime repo to unconstrain the generic overload from class-only behaviour for Interlocked.Exchange and Interlocked.CompareExchange, we can adjust the code in the WPF repo for improved code quality as well.

Given how few places we rely on Interlocked functionality, this should be easy to review.

Customer Impact

None, just internal code quality changes that do not measurably affect performance in any direction.

Regression

No.

Testing

Local build/CI.

Risk

None.

Microsoft Reviewers: Open in CodeFlow

@siagupta0202
Copy link
Contributor

siagupta0202 commented Mar 3, 2025

The PR looks good to me. @h3xds1nz if you could resolve the merge conflicts please?

@h3xds1nz h3xds1nz force-pushed the unconstrain-compare-exchange branch from f32b763 to 9a39289 Compare March 3, 2025 09:19
@h3xds1nz
Copy link
Member Author

h3xds1nz commented Mar 3, 2025

@siagupta0202 Done, should be fine :)

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 5.88235% with 16 lines in your changes missing coverage. Please review.

Project coverage is 10.94612%. Comparing base (d94671d) to head (9a39289).
Report is 5 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main       #9480         +/-   ##
===================================================
- Coverage   10.99508%   10.94612%   -0.04896%     
===================================================
  Files           3215        3215                 
  Lines         648472      648440         -32     
  Branches       71534       71527          -7     
===================================================
- Hits           71300       70979        -321     
- Misses        576170      576469        +299     
+ Partials        1002         992         -10     
Flag Coverage Δ
Debug 10.94612% <5.88235%> (-0.04896%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@siagupta0202 siagupta0202 merged commit f944708 into dotnet:main Mar 3, 2025
8 checks passed
@siagupta0202
Copy link
Contributor

@h3xds1nz Thank you so much for all your contributions!

@h3xds1nz
Copy link
Member Author

h3xds1nz commented Mar 3, 2025

@siagupta0202 Thank you for reviewing :)

@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants