0.2.1 (current) Thoroughness: Medium Understanding: Medium
by yvt on 2021-09-20
This review is from Crev, a distributed system for code reviews. To add your review, set up cargo-crev
.
0.2.1 (current) Thoroughness: Medium Understanding: Medium
by yvt on 2021-09-20
Lib.rs has been able to verify that all files in the crate's tarball are in the crate's repository. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.
To review the actual code of the crate, it's best to use cargo crev open atomic_ref
. Alternatively, you can download the tarball of atomic_ref v0.2.1 or view the source online.
This crate provides an atomic cell to store
Option<&T>
.This crate is sound and has no known issues.
AtomicRef
has the correct trait bounds forSync
/Send
-ness and employs the minimum memory ordering to make sure that, when a reference that was recently written through was stored to anAtomicRef
, whoever loads that reference is guaranteed to observe the value written. (This requires acquire/release synchronization for all loads and stores onAtomicRef
. Without it, the reader could observe a stale value, causing an undefined behavior. This was recently reported by #5 and fixed by #6.)Issue: High (github.com/mystor/atomic_ref/pull/6)
Previous verions of
atomic_ref
have a bug in whichAtomicRef
's methods accept unsafe memory orderings.