mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-20 00:00:08 +02:00
executor: fix blocking pool bug re: thread shutdown (#1562)
Currently, when threads in the blocking pool shutdown due to being idle the counter tracking threads is not decremented. This prevents new threads from being spawned to replace the shutdown threads.
This commit is contained in:
committed by
Carl Lerche
parent
e3415d8d61
commit
22a3b10171
@@ -118,6 +118,8 @@ fn spawn_thread() {
|
||||
run_task(task);
|
||||
continue 'outer;
|
||||
} else if timeout_result.timed_out() {
|
||||
shared.num_idle = shared.num_idle.saturating_sub(1);
|
||||
shared.num_th -= 1;
|
||||
break 'outer;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user