From d9b2dc81ca2a145f6b5ca91ccd05f14dbfdfb8cd Mon Sep 17 00:00:00 2001 From: Andrew Hlynskyi Date: Tue, 21 Sep 2021 11:20:03 +0300 Subject: [PATCH] task: improve JoinHandle::abort cancellation doc (#4121) --- tokio/src/runtime/task/join.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tokio/src/runtime/task/join.rs b/tokio/src/runtime/task/join.rs index 2fe40a721..0abbff20e 100644 --- a/tokio/src/runtime/task/join.rs +++ b/tokio/src/runtime/task/join.rs @@ -162,7 +162,7 @@ impl JoinHandle { /// /// Awaiting a cancelled task might complete as usual if the task was /// already completed at the time it was cancelled, but most likely it - /// will complete with a `Err(JoinError::Cancelled)`. + /// will fail with a [cancelled] `JoinError`. /// /// ```rust /// use tokio::time; @@ -190,6 +190,7 @@ impl JoinHandle { /// } /// } /// ``` + /// [cancelled]: method@super::error::JoinError::is_cancelled pub fn abort(&self) { if let Some(raw) = self.raw { raw.remote_abort();