Skip to content

Commit 86b40aa

Browse files
committed
Fix test failure
1 parent ee1d20c commit 86b40aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/driver.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ pub fn block_on<T>(future: impl Future<Output = T>) -> T {
179179
loop {
180180
// Poll the future.
181181
if let Poll::Ready(t) = future.as_mut().poll(cx) {
182+
// Ensure the cached parker is reset to the unnotified state for future block_on calls,
183+
// in case this future called wake and then immediately returned Poll::Ready.
184+
p.park_timeout(Duration::from_secs(0));
182185
tracing::trace!("completed");
183186
return t;
184187
}

0 commit comments

Comments
 (0)