Fix CancelableTask
This commit is contained in:
@@ -80,8 +80,10 @@ impl CancelFlag {
|
||||
|
||||
#[inline]
|
||||
pub async fn await_cancel(&self) {
|
||||
if self.is_cancelled() {
|
||||
return;
|
||||
}
|
||||
self.notify.notified().await;
|
||||
assert!(self.is_cancelled());
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user