pub fn schedule_blocking<T, F>(func: F) -> Receiver<T> where
    T: Send + 'static,
    F: FnOnce() -> T + Send + 'static, 
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.