Function tokio::runtime::blocking::pool::spawn_blocking

source ·
pub(crate) fn spawn_blocking<F, R>(func: F) -> 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 non-mandatory, meaning they may not get executed in case of runtime shutdown.