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
|
|
@ -85,10 +85,9 @@ impl TestClient {
|
|||
}
|
||||
|
||||
pub async fn sync(&self) {
|
||||
self.run.state.eng.yield_now().await;
|
||||
self.run.sync().await;
|
||||
self.tran.sync().await;
|
||||
self.run.state.eng.yield_now().await;
|
||||
self.run.state.idle().await;
|
||||
}
|
||||
|
||||
pub async fn take_screenshot(&self, include_cursor: bool) -> Result<Vec<u8>, TestError> {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ impl TestJayCompositor {
|
|||
&self,
|
||||
include_cursor: bool,
|
||||
) -> Result<(DmaBuf, Option<Rc<OwnedFd>>), TestError> {
|
||||
self.tran.sync().await;
|
||||
self.tran.run.state.idle().await;
|
||||
let js = Rc::new(TestJayScreenshot {
|
||||
id: self.tran.id(),
|
||||
state: self.tran.run.state.clone(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue