pub fn spawn_fn<T>(
op: impl FnOnce() -> T + Send + 'static
) -> SpawnHandle<T, BlockingError>where
T: Send + 'static,
Expand description
Spawns a task to execute the specified blocking section and returns its handle.
This function is equivalent to spawn_with_handle(blocking(op))
.