#atom #atomic #pointers #sync #no-std

nightly no-std hv-atom

Convenient abstractions for atomic operations on smart pointer/reference types, based on the atom crate

1 unstable release

0.1.0 Nov 12, 2021

#1081 in Concurrency

32 downloads per month
Used in hv-alchemy

MIT/Apache

17KB
318 lines

Heavy Atom - convenient atomic pointer abstractions based on the atom crate

A hard fork of the atom crate which fixes some soundness issues and adds (requiring nightly features) const-initializers for Atom and AtomSetOnce.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

no_std port of the atom crate.

Notable changes:

  • Atomic orderings fixed w.r.t. atom operations; Relaxed should never be allowed in the first place.
  • Atom::empty() and AtomSetOnce::empty() are allowed to be const (requires the const_fn_fn_ptr_basics feature. This crate requires nightly rust, 1.58 up.)

No runtime deps