wait

Function wait 

Source
pub fn wait<T>(fut: impl Future<Output = T>) -> T
Expand description

Wait for a future to complete and return its output.

If the function is called directly or recursively from a closure passed to stackful, then the Future returned by stackful would return Pending. Otherwise the current thread would block until the future has been completed.