atomex 0.1.1

Atomics extensions in Rust
docs.rs failed to build atomex-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: atomex-0.1.0

atomex

Ask DeepWiki

Some useful extensions around Atomic* in core::sync::atomic.

This crate is mainly inspired by atomic-traits

Example

use core::sync::atomic::*;
use atomex::AtomicCount;

let atm = AtomicUsize::new(0usize);
let cnt = AtomicCount::<usize, AtomicUsize>::new(atm);

let mut atm = cnt.into_inner();
let cnt = AtomicCount::<usize, &mut AtomicUsize>::new(&mut atm);

assert_eq!(cnt.inc(), 0usize);
assert_eq!(cnt.dec(), 1usize);
assert_eq!(cnt.val(), 0usize);