feat: add __concurrent/arc-swap
This commit is contained in:
11
__concurrent/arc-swap/src/main.rs
Normal file
11
__concurrent/arc-swap/src/main.rs
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user