kumo_server_runtime

Function spawn_blocking

source
pub fn spawn_blocking<F, N, R>(name: N, func: F) -> Result<JoinHandle<R>>
where F: FnOnce() -> R + Send + 'static, R: Send + 'static, N: AsRef<str>,
Expand description

Run a blocking function in the worker thread pool associated with the current tokio runtime.