Skip to content

Commit

Permalink
Update tokio/src/runtime/task/mod.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
agayev and hawkw committed Nov 10, 2022
1 parent 3ab3bdf commit 5d36509
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tokio/src/runtime/task/mod.rs
Expand Up @@ -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<Id> {
Expand Down

0 comments on commit 5d36509

Please sign in to comment.