[][src]Function actix_web::web::block

pub fn block<F, I, E>(f: F) -> impl Future<Item = I, Error = BlockingError<E>> where
    F: FnOnce() -> Result<I, E> + Send + 'static,
    I: Send + 'static,
    E: Send + Debug + 'static, 

Execute blocking function on a thread pool, returns future that resolves to result of the function execution.