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

Add AtomicCell::fetch_update #704

Merged
merged 1 commit into from
May 29, 2021
Merged

Add AtomicCell::fetch_update #704

merged 1 commit into from
May 29, 2021

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented May 28, 2021

Equivalent of std::sync::atomic::AtomicN::fetch_update that stabilized in Rust 1.45.

@PatrickNorton
Copy link
Contributor

Would it be a good idea to add a fetch_update method to Atomic as well? If so, I'd be happy to write it.

@taiki-e
Copy link
Member Author

taiki-e commented May 29, 2021

@PatrickNorton It seems a good idea. I would be happy to accept a PR to add Atomic::fetch_update.

@taiki-e
Copy link
Member Author

taiki-e commented May 29, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented May 29, 2021

Build succeeded:

@bors bors bot merged commit 9a9dd75 into master May 29, 2021
@bors bors bot deleted the atomic-cell-fetch-update branch May 29, 2021 10:41
bors bot added a commit that referenced this pull request May 30, 2021
707: Prepare for the next release r=taiki-e a=taiki-e

- crossbeam-epoch 0.9.4 -> 0.9.5
  - Fix UB in `Pointable` impl of `[MaybeUninit<T>]` (#694)
  - Support targets that do not have atomic CAS on stable Rust (#698)
  - Fix breakage with nightly feature due to rust-lang/rust#84510 (#692)
- crossbeam-queue 0.3.1 -> 0.3.2
  - Support targets that do not have atomic CAS on stable Rust (#698)
- crossbeam-utils 0.8.4 -> 0.8.5
  - Add `AtomicCell::fetch_update` (#704)
  - Support targets that do not have atomic CAS on stable Rust (#698)
- crossbeam 0.8.0 -> 0.8.1
  - Support targets that do not have atomic CAS on stable Rust (#698)

Closes #702 

Co-authored-by: Taiki Endo <te316e89@gmail.com>
bors bot added a commit that referenced this pull request May 31, 2021
706: Add Atomic::fetch_update r=taiki-e a=PatrickNorton

Equivalent of [`AtomicN::fetch_update`](https://doc.rust-lang.org/nightly/core/sync/atomic/struct.AtomicUsize.html#method.fetch_update) and [`AtomicCell::fetch_update`](#704).

Co-authored-by: Patrick Norton <patrick.147.norton@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.

2 participants