async-watch-once
This crate provides a shareable container OnceWatch<T>
in Rust, which value is set once. The readers wait in asynchronous manner until the value is ready.
use OnceWatch;
use ;
use Lazy;
use Duration;
static STATE: = new;
let secret = 10;
/* Writer */
spawn;
/* Reader */
spawn;
License
MIT license. See license file.