Add deterministic TestDispatcher

Co-Authored-By: Conrad Irwin <conrad@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-10-25 17:33:16 +02:00
parent 437d147935
commit 3566d920c5
10 changed files with 372 additions and 198 deletions

View file

@ -145,8 +145,10 @@ impl Executor {
match future.as_mut().poll(&mut cx) {
Poll::Ready(result) => return result,
Poll::Pending => {
// todo!("call tick on test dispatcher")
parker.park();
if !self.dispatcher.poll() {
// todo!("forbid_parking")
parker.park();
}
}
}
}