Skip to content
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

Deprecate AtomicCell::compare_and_swap #619

Merged
merged 1 commit into from Dec 24, 2020

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Dec 24, 2020

The standard library deprecated compare_and_swap in favor of compare_exchange(_weak) in 1.50. (rust-lang/rust#79261)

Given why std compare_and_swap was deprecated, it probably makes sense to do the same with AtomicCell::compare_and_swap.

Closes #618

@jeehoonkang
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 24, 2020

Build succeeded:

@bors bors bot merged commit 4fd3674 into crossbeam-rs:master Dec 24, 2020
@taiki-e taiki-e deleted the atomic_cell_compare_and_swap branch December 24, 2020 04:53
@taiki-e taiki-e mentioned this pull request Jan 4, 2021
bors bot added a commit that referenced this pull request Feb 20, 2021
659: Prepare for the next release r=taiki-e a=taiki-e

It's been over two months since the previous release. There are some improvements and deprecations in the master branch, and it would be nice to release them. Also, there is no breaking change that needs a major version bump.

Changes:

- crossbeam-epoch 0.9.1 -> 0.9.2
  - Add `Atomic::compare_exchange` and `Atomic::compare_exchange_weak`. (#628)
  - Deprecate `Atomic::compare_and_set` and `Atomic::compare_and_set_weak`. (#628)
  - Make `const_fn` dependency optional. (#611)
  - Add unstable support for `loom`. (#487)
- crossbeam-utils 0.8.1 -> 0.8.2
  - Deprecate `AtomicCell::compare_and_swap`. (#619)
  - Add `Parker::park_deadline`. (#563)
  - Improve implementation of `CachePadded`. (#636)
  - Add unstable support for `loom`. (#487)


Co-authored-by: Taiki Endo <te316e89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Deprecate AtomicCell::compare_and_swap
2 participants