Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
BigWingBeat committed Sep 11, 2023
1 parent ee1d20c commit 86b40aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ pub fn block_on<T>(future: impl Future<Output = T>) -> T {
loop {
// Poll the future.
if let Poll::Ready(t) = future.as_mut().poll(cx) {
// Ensure the cached parker is reset to the unnotified state for future block_on calls,
// in case this future called wake and then immediately returned Poll::Ready.
p.park_timeout(Duration::from_secs(0));
tracing::trace!("completed");
return t;
}
Expand Down

0 comments on commit 86b40aa

Please sign in to comment.