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

tokio(metrics): fix blocking_threads count #6551

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update tokio/src/runtime/scheduler/multi_thread_alt/handle/metrics.rs
  • Loading branch information
Darksonn authored May 25, 2024
commit b31f0336b00509e1dc636e78a5cdca0faeef8222
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ impl Handle {

pub(crate) fn num_blocking_threads(&self) -> usize {
// workers are currently spawned within the blocking_spawned
self.blocking_spawner.num_threads() - self.num_workers()
self.blocking_spawner.num_threads().saturating_sub(self.num_workers())
}

pub(crate) fn num_idle_blocking_threads(&self) -> usize {
Expand Down
Loading