Skip to content

Wrappers around Atomics that always use Ordering::Relaxed

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

dimpolo/relaxed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

relaxed

github Crates.io docs.rs

Wrappers around Atomics that always use Ordering::Relaxed

// instead of:
use std::sync::atomic::{AtomicBool, Ordering};
let atomic = AtomicBool::new(false);
atomic.store(true, Ordering::Relaxed);
assert_eq!(atomic.load(Ordering::Relaxed), true);

// you can do:
use relaxed::RelaxedBool;
let atomic = RelaxedBool::new(false);
atomic.set(true);
assert_eq!(atomic.get(), true);

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

About

Wrappers around Atomics that always use Ordering::Relaxed

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages