Function safina::executor::schedule_blocking
source · [−]pub fn schedule_blocking<T, F>(func: F) -> Receiver<T> where
T: 'static + Send,
F: 'static + FnOnce() -> T + Send,
Expand description
Schedules func
to run on any available thread in the blocking thread pool.
Returns immediately.
Use the returned receiver to get the result of func
.
If func
panics, the receiver returns RecvError
.
Puts func
in a
Box
before adding it to the thread pool queue.
Panics
Panics if the caller is not running on an Executor
.