sync_cow 0.1.2

Thread-safe clone-on-write container for fast concurrent writing and reading.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use sync_cow::SyncCow;

fn main() {
    let cow = SyncCow::new(5);

    let val = cow.read();
    println!("Val: {}", *val);
    cow.edit(|x| *x = 9);
    println!("Old val after write: {}", *val);
    println!("New val after write: {}", *cow.read());
}