Uses old Rust 2015
|0.1.1||Jan 12, 2016|
|0.1.0||Jan 12, 2016|
|0.0.6||Feb 6, 2015|
|0.0.5||Dec 16, 2014|
23,907 downloads per month
Used in 14 crates (3 directly)
A mutex providing one-time synchronized access, then safe lock-free access.
Use the crates.io repository; add this to your
with the rest of your dependencies:
[dependencies] once-mutex = "*"
Jonathan Reem is the primary author and maintainer of OnceMutex.
A mutex which can only be locked once, but which provides very fast concurrent reads after the first lock is over.
# use oncemutex::OnceMutex; let mutex = OnceMutex::new(8); // One-time lock *mutex.lock().unwrap() = 9; // Cheap lock-free access. assert_eq!(*mutex, 9);