We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
num_idle_threads
1 parent d83921b commit c23735dCopy full SHA for c23735d
1 file changed
tokio/src/runtime/blocking/pool.rs
@@ -568,13 +568,13 @@ impl Inner {
568
// Thread exit
569
self.metrics.dec_num_threads();
570
571
- // num_idle should now be tracked exactly, panic
+ // `num_idle_threads` should now be tracked exactly, panic
572
// with a descriptive message if it is not the
573
// case.
574
let prev_idle = self.metrics.dec_num_idle_threads();
575
- assert!(
576
- prev_idle >= self.metrics.num_idle_threads(),
577
- "num_idle_threads underflowed on thread exit"
+ assert_ne!(
+ prev_idle, 0,
+ "`num_idle_threads` underflowed on thread exit"
578
);
579
580
if shared.shutdown && self.metrics.num_threads() == 0 {
0 commit comments