Add `FutureExt::wait`
yoshuawuyts opened this issue · comments
Design Sketch
trait FutureExt: Future {
/// Wait for the `Future` to complete execution.
pub fn wait(self) -> <Self as Future>::Output;
}
Rationale here: smol-rs/async-task#16 (comment), but after having researched it further I no longer think this is a good idea. Instead if we want to optimize specific sync variants of futures we should be able to provide specializations for those futures in thread::block_on
.