Function tokio::runtime::blocking::pool::spawn_mandatory_blocking

source ยท
pub(crate) fn spawn_mandatory_blocking<F, R>(func: F) -> Option<JoinHandle<R>>
where F: FnOnce() -> R + Send + 'static, R: Send + 'static,
Expand description

Runs the provided function on an executor dedicated to blocking operations. Tasks will be scheduled as mandatory, meaning they are guaranteed to run unless a shutdown is already taking place. In case a shutdown is already taking place, None will be returned.