An eventually-consistent, lock-free, mutable store of shared data.
Just stick it on the pinboard!
https://docs.rs/pinboard/
Install from crates.io by adding pinboard
to your Cargo.toml
:
[dependencies]
pinboard = "1.0.0"
Now you can create a Pinboard, share it between your users (be they Futures
, threads or really anything else) and start sharing data!
``` let weather_report = Pinboard::new("Sunny");
crossbeam::scope(|scope| { scope.spawn(|| { thread::sleep(10); weatherreport.set("Raining"); }) scope.spawn(|| { loop { println("The weather is {}", weatherreport.read()); thread::sleep(1); } }) }) ```