runtime: actually park on Pending...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-01-21 10:37:16 +01:00
parent 2d51569396
commit 077ac6f8b3

View File

@ -135,7 +135,7 @@ fn block_on_local_future<F: Future>(mut fut: F) -> F::Output {
loop {
match fut.as_mut().poll(&mut context) {
Poll::Ready(out) => return out,
Poll::Pending => continue,
Poll::Pending => thread::park(),
}
}
}