mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
task: add #[must_use]
to JoinHandle::abort_handle
(#6762)
This commit is contained in:
parent
a491b16a89
commit
6ad1912353
@ -296,6 +296,7 @@ impl<T> JoinHandle<T> {
|
||||
/// # }
|
||||
/// ```
|
||||
/// [cancelled]: method@super::error::JoinError::is_cancelled
|
||||
#[must_use = "abort handles do nothing unless `.abort` is called"]
|
||||
pub fn abort_handle(&self) -> super::AbortHandle {
|
||||
self.raw.ref_inc();
|
||||
super::AbortHandle::new(self.raw)
|
||||
|
Loading…
x
Reference in New Issue
Block a user