Cancel fix

This commit is contained in:
2026-03-16 22:24:39 -07:00
parent 12130a0471
commit e03d3acfde

View File

@@ -80,10 +80,12 @@ impl CancelFlag {
#[inline]
pub async fn await_cancel(&self) {
if self.is_cancelled() {
return;
let notified = self.notify.notified();
tokio::pin!(notified);
notified.as_mut().enable();
if !self.is_cancelled() {
notified.await;
}
self.notify.notified().await;
}
#[inline]