Function cassette::block_on

source ·
pub fn block_on<F: Future>(f: F) -> <F as Future>::Output
Expand description

Runs a future to completion on the current thread.

This function will block the caller until the given future has completed.

Be aware that this function performs busy-waiting; it repeatedly polls the future until completion and completely ignores context and wakers.