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:
Jonathan Bastien-Filiatrault
2019-09-19 11:12:04 -07:00
committed by Carl Lerche
parent e3415d8d61
commit 22a3b10171
+2
View File
@@ -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;
}
}