[][src]Function blocking_permit::dispatch_rx

pub fn dispatch_rx<F, T>(f: F) -> DispatchRx<F, T> where
    F: FnOnce() -> T + Send + 'static,
    T: Send + 'static, 

Dispatch a blocking operation closure to a registered pool, returning a future for awaiting the result.

If a pool has been registered via register_dispatch_pool, then the closure is spawned on the pool, and this returns a Dispatched future, which resolves to the result of the closure. Otherwise the original closure is returned.