Function tokio_executor::with_default

source ยท
pub fn with_default<T, F, R>(executor: &mut T, f: F) -> R
where T: Executor, F: FnOnce() -> R,
Expand description

Set the default executor for the duration of the closure

If a default executor is already set, it will be restored when the closure returns or if it panics.