feat: add __concurrent/arc-swap

This commit is contained in:
2020-11-04 01:04:22 +08:00
parent 5c9a439fe1
commit 9c8c467fea
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
use once_cell::sync::Lazy;
use arc_swap::ArcSwap;
static TEST_STRING: Lazy<ArcSwap<String>> = Lazy::new(|| {
ArcSwap::from_pointee("Hello World!".to_owned())
});
fn main() {
let s = TEST_STRING.load();
println!("{}", s);
}