it: wait for async engine and cpu worker to become idle
This commit is contained in:
parent
58f82d889b
commit
a9aad0c613
5 changed files with 59 additions and 3 deletions
10
src/state.rs
10
src/state.rs
|
|
@ -1218,6 +1218,16 @@ impl State {
|
|||
output.vblank();
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "it")]
|
||||
pub async fn idle(&self) {
|
||||
loop {
|
||||
self.eng.idle().await;
|
||||
if self.cpu_worker.wait_idle() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue