Skip to content

Conversation

Owen-CH-Leung
Copy link
Contributor

Motivation

Further to #6899 , this PR further stabilises 2 more API worker_unpark_count and worker_park_count.

Solution

Move the API impl out of tokio_unstable flag

Ref: #6546

@Owen-CH-Leung Owen-CH-Leung marked this pull request as ready for review April 18, 2025 11:58
@maminrayej maminrayej added A-tokio Area: The main tokio crate M-metrics Module: tokio/runtime/metrics labels Apr 21, 2025
@Darksonn Darksonn requested review from hds and Noah-Kennedy April 23, 2025 09:13
Copy link
Contributor

@hds hds left a comment

Choose a reason for hiding this comment

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

This looks good to me!

I think it's unfortunate that we're duplicating code between stable and unstable functions, but at least they're right next to one another, and I don't think that this PR is the place to rework the stable/unstable code split (I know we went over that a lot in previous PRs).

@Owen-CH-Leung
Copy link
Contributor Author

This looks good to me!

I think it's unfortunate that we're duplicating code between stable and unstable functions, but at least they're right next to one another, and I don't think that this PR is the place to rework the stable/unstable code split (I know we went over that a lot in previous PRs).

Thanks! I agree about the code duplicaton. Once we fully stabilize the metrics API, the duplication issue should naturally resolve itself as we'll no longer need separate code paths for stable and unstable features

@Darksonn Darksonn merged commit 0ce3a11 into tokio-rs:master Apr 28, 2025
87 checks passed
kodiakhq bot pushed a commit to pdylanross/fatigue that referenced this pull request May 6, 2025
Bumps tokio from 1.44.2 to 1.45.0.

Release notes
Sourced from tokio's releases.

Tokio v1.45.0
Added

metrics: stabilize worker_total_busy_duration, worker_park_count, and worker_unpark_count (#6899, #7276)
process: add Command::spawn_with (#7249)

Changed

io: do not require Unpin for some trait impls (#7204)
rt: mark runtime::Handle as unwind safe (#7230)
time: revert internal sharding implementation (#7226)

Unstable

rt: remove alt multi-threaded runtime (#7275)

#6899: tokio-rs/tokio#6899
#7276: tokio-rs/tokio#7276
#7249: tokio-rs/tokio#7249
#7204: tokio-rs/tokio#7204
#7230: tokio-rs/tokio#7230
#7226: tokio-rs/tokio#7226
#7275: tokio-rs/tokio#7275



Commits

00754c8 chore: prepare Tokio v1.45.0 (#7308)
1ae9434 time: revert "use sharding for timer implementation" related changes (#7226)
8895bba ci: Test AArch64 Windows (#7288)
48ca254 time: update sleep documentation to reflect maximum allowed duration (#7302)
a0af02a compat: add more documentation to tokio_util::compat (#7279)
0ce3a11 metrics: stabilize worker_park_count and worker_unpark_count (#7276)
1ea9ce1 ci: fix cfg!(miri) declarations in tests (#7286)
4d4d126 chore: prepare tokio-util v0.7.15 (#7283)
5490267 fs: update the mockall dev dependency to 0.13.0 (#7234)
1434b32 examples: improve echo example consistency (#7256)
Additional commits viewable in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants