[−][src]Function actix_web::test::block_on
pub fn block_on<F>(
f: F
) -> Result<<F as IntoFuture>::Item, <F as IntoFuture>::Error> where
F: IntoFuture,
Runs the provided future, blocking the current thread until the future completes.
This function can be used to synchronously block the current thread
until the provided future
has resolved either successfully or with an
error. The result of the future is then returned from this function
call.
Note that this function is intended to be used only for testing purpose. This function panics on nested call.