[−][src]Function blocker::block
pub fn block<'a, T>(future: impl Future<Output = T>) -> T where
T: 'a,
block is the heart of the blocker crate. When called with any future as parameter it blocks the
program until the future completes. When futures return Pending
, the future
will just be repolled. When the thread_yield
feature is enabled, a pending future will yield the
current thread. Note that this only works when std is available.