tessera_ui/
tokio_runtime.rs1use std::sync::OnceLock;
2
3static RUNTIME: OnceLock<tokio::runtime::Runtime> = OnceLock::new();
4
5pub fn get() -> &'static tokio::runtime::Runtime {
6 RUNTIME.get_or_init(|| {
7 tokio::runtime::Builder::new_multi_thread()
8 .enable_all()
9 .build()
10 .unwrap()
11 })
12}