async sleep

This commit is contained in:
dignifiedquire
2020-03-04 17:27:25 +01:00
parent 43a8828430
commit 62bfa5157b
4 changed files with 6 additions and 6 deletions

View File

@@ -283,7 +283,7 @@ impl Imap {
// not have entered idle_wait yet, give it some time
// for that to happen. XXX handle this without extra wait
// https://github.com/deltachat/deltachat-core-rust/issues/925
std::thread::sleep(Duration::from_millis(200));
async_std::task::sleep(Duration::from_millis(200)).await;
info!(context, "low-level: dropping stop-source to interrupt idle");
std::mem::drop(interrupt)
}