[][src]Function tokio_executor::with_default

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

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.