We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3b235d commit 230b0a4Copy full SHA for 230b0a4
src/task.rs
@@ -513,6 +513,13 @@ impl<T> FallibleTask<T> {
513
pub async fn cancel(self) -> Option<T> {
514
self.task.cancel().await
515
}
516
+
517
+ /// Returns `true` if the current task is finished.
518
+ ///
519
+ /// Note that in a multithreaded environment, this task can change finish immediately after calling this function.
520
+ pub fn is_finished(&self) -> bool {
521
+ self.task.is_finished()
522
+ }
523
524
525
impl<T> Future for FallibleTask<T> {
0 commit comments