The API is similar to =std::sync::RwLock=. Reads are lock-free and never block. Writes update the data protected by the lock only when the write guard is dropped.
See [[https://docs.rs/rculock/][documentation]] for more details.
** Example
use rculock::{RcuLock, RcuGuard};
// Create a new RcuLock protecting a piece of data, in this case a number (u32).
let data: RcuLockDeref
and DerefMut
for easy access to the data.
*guard = 4;
// The writer has changed its copy of the data, but the changes
// have not yet made it back to the master RcuLock
.
assert