From 5d36509f07b15274d2f063e86131b5380e872830 Mon Sep 17 00:00:00 2001 From: Abutalib Aghayev Date: Thu, 10 Nov 2022 15:34:36 -0500 Subject: [PATCH] Update tokio/src/runtime/task/mod.rs Co-authored-by: Eliza Weisman --- tokio/src/runtime/task/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tokio/src/runtime/task/mod.rs b/tokio/src/runtime/task/mod.rs index eb8284ff6be..0a01860aa0c 100644 --- a/tokio/src/runtime/task/mod.rs +++ b/tokio/src/runtime/task/mod.rs @@ -249,6 +249,12 @@ pub fn id() -> Id { /// This function is similar to [`task::id()`](crate::runtime::task::id()), except /// that it returns `None` rather than panicking if called outside of a task /// context. +/// +/// **Note**: This is an [unstable API][unstable]. The public API of this type +/// may break in 1.x releases. See [the documentation on unstable +/// features][unstable] for details. +/// +/// [task ID]: crate::task::Id #[cfg_attr(not(tokio_unstable), allow(unreachable_pub))] #[track_caller] pub fn try_id() -> Option {