actix-net
actix-net copied to clipboard
with_tokio_rt closure requires to pass `Runtime`
It would be nice if with_tokio_rt also works with closures that e.g., return Arc<Runtime>
or similar.
e.g., my use-case is that my tokio runtime is declared as
pub static TOKIO: Lazy<Runtime> = Lazy::new(|| Runtime::new().unwrap());
to share it across the code and I'd like to be able to pass it to System::with_tokio_rt
too, but Runtime doesn't implement Copy.