use std::sync::OnceLock;
use tokio::runtime::{Builder, Handle, Runtime};
static RUNTIME: OnceLock<Runtime> = OnceLock::new();
pub(crate) fn ensure() -> &'static Runtime {
RUNTIME.get_or_init(|| {
Builder::new_multi_thread()
.enable_all()
.thread_name("aurelia-runtime")
.build()
.expect("failed to create Aurelia runtime")
})
}
pub(crate) fn handle() -> Handle {
ensure().handle().clone()
}