-
I want to use Runtime in tokio::runtime - Rust
-
I don't want to create a new Runtime.
-
Is there a way to tell tokio: "spawn on current runtime" ?
-
If not, do I have to pass an
Arc<Runtime>
around ?
This whole thing is kind of weird, it is a followup to Drop handler, tokio::sync::Mutex, async where if I want to call async in the drop handler, I need to somehow have access to a tokio RunTime -- this then implies I need to keep a Arc<tokio::Runtime>
in every struct whose drop handler might do some async work ?