paperclip_actix::web

Function block

pub fn block<F, R>(f: F) -> impl Future<Output = Result<R, BlockingError>>
where F: FnOnce() -> R + Send + 'static, R: Send + 'static,
Expand description

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