Remove non-determinism from autosave after delay

This commit is contained in:
Antonio Scandurra 2022-07-05 17:54:54 +02:00
parent a5c39acf4c
commit f09d265054

View file

@ -5596,9 +5596,9 @@ impl Editor {
.timer(Duration::from_millis(milliseconds))
.fuse();
pending_autosave.await;
futures::select! {
_ = timer => {}
futures::select_biased! {
_ = cancel_rx => return None,
_ = timer => {}
}
this.upgrade(&cx)?