Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added explanatory comments in runtime.rs for better understanding for… #6747

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SarthakPaandey
Copy link

@SarthakPaandey SarthakPaandey commented Aug 4, 2024

Added explanatory comments for RuntimeMetrics methods

Motivation

The current documentation for RuntimeMetrics methods doesn't clearly indicate when both tokio_unstable and 64-bit atomic features are required. This can lead to confusion for users trying to use these metrics, especially when compiling for different targets or with different feature sets.

Solution

As a temporary measure, I've added inline comments to the RuntimeMetrics implementation in runtime.rs. These comments explicitly state when a method requires both the tokio_unstable feature and 64-bit atomics.

This is intended as an intermediate step towards a more comprehensive solution that may involve modifying the cfg macros to properly combine these conditions in the documentation.

Changes made:

@Darksonn Darksonn added T-docs Topic: documentation A-tokio Area: The main tokio crate M-metrics Module: tokio/runtime/metrics labels Aug 5, 2024
@Darksonn
Copy link
Contributor

Darksonn commented Aug 5, 2024

I would like to go immediately to having the "Available on xyz only." tag show the right thing. I don't think there's any need of a temporary solution.

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-metrics Module: tokio/runtime/metrics T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some unstable runtime metrics show up as stable in docs.rs
2 participants