RcuCell
A lockless rcu cell implementation that can be used safely in multithread context.
Features
- Support multi-thread read and write operations.
- The read operation would not block other read operations.
- The read operation is always waitless.
- The read operation is something like Arc::clone.
- The write operation would not block other read operations.
- The write operation is lockless.
- The write operation is something like Atomic Swap.
- The RcuCell could contain no data
- Could be compiled with no_std
Usage
use RcuCell;
use Arc;
let t = new;
let t1 = t.clone;
let t2 = t.clone;
let d1 = t1.take.unwrap;
assert_eq!;
assert_eq!;
let d2 = t2.write;
assert!;
let d3 = t2.read.unwrap;
assert_eq!;