Skip to content

Replace deprecated compare_and_swap with compare_exchange #514

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
Feb 5, 2021

Conversation

hawkw
Copy link
Collaborator

@hawkw hawkw commented Feb 4, 2021

The compare_and_swap method on atomics is now deprecated in favor
of compare_exchange.

Since the author of #510 closed that PR, this is just #510 with rustfmt run.

I also removed an unnecessary trailing semicolon that the latest rust
compiler now complains about.

@hawkw hawkw requested a review from seanmonstar February 4, 2021 23:33
Signed-off-by: Eliza Weisman <[email protected]>
Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

(Watching us update these CAS to a slightly more verbose boilerplate makes me wonder how useful this deprecation really is...)

@hawkw hawkw merged commit 2c8c847 into master Feb 5, 2021
@hawkw hawkw deleted the eliza/compare-and-swap branch February 5, 2021 17:27
@hawkw
Copy link
Collaborator Author

hawkw commented Feb 5, 2021

LGTM!

(Watching us update these CAS to a slightly more verbose boilerplate makes me wonder how useful this deprecation really is...)

🤷 i'm not convinced it was necessary, although having a smaller API surface is good i guess?

BenxiangGe pushed a commit to BenxiangGe/h2 that referenced this pull request Jul 26, 2021
)

The `compare_and_swap` method on atomics is now deprecated in favor
of `compare_exchange`.

Since the author of hyperium#510 closed that PR, this is just hyperium#510 with rustfmt run.

I also removed an unnecessary trailing semicolon that the latest rust
compiler now complains about.

Signed-off-by: Eliza Weisman <[email protected]>

Co-authored-by: Kornel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants