Skip to content

Conversation

joe-amzn
Copy link

Motivation

I was confused by this to I opened #7591

Solution

Update the documentation so future people know not to trust this metric when using the multithreaded runtime.

@ADD-SP ADD-SP added T-docs Topic: documentation A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime labels Sep 14, 2025
Comment on lines +57 to +60
/// Note: When using the multi-threaded runtime this number may not
/// not have strong consistency i.e. no tasks may be running but the metric
/// reports otherwise.
///
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say RuntimeMetrics is not designed to be accurate, I think it would better move this "Note" to the struct level.

@ADD-SP ADD-SP added the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants