[][src]Function actix_http_test::block_on

pub fn block_on<F>(f: F) -> Result<F::Item, F::Error> where
    F: Future

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.