MCPcopy Create free account
hub / github.com/bajrangCoder/setu / shared_tokio_runtime

Function shared_tokio_runtime

src/utils/runtime.rs:8–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6use tokio::time::sleep;
7
8pub fn shared_tokio_runtime() -> Arc<Runtime> {
9 static RUNTIME: OnceLock<Arc<Runtime>> = OnceLock::new();
10
11 RUNTIME
12 .get_or_init(|| Arc::new(Runtime::new().expect("Failed to create shared Tokio runtime")))
13 .clone()
14}
15
16struct DebouncedJsonWriterState<T> {
17 pending: Option<T>,

Callers 2

newMethod · 0.85
newMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected