Function try_blocking
Source pub fn try_blocking<T, E>(
f: impl FnOnce(Sender<T>) -> Result<(), E> + Send + 'static,
) -> Task<Result<T, E>>where
T:
Send + 'static,
E:
Send + 'static,
Expand description
Creates a new Task
that will run the given closure that can fail in a new
thread.
Any data sent by the closure through the [mpsc::Sender
] will be produced
by the Task
.