Move thread shutdown code to after loop
Moving the fan-out thread shutdown logic to after the loop break, in
order to ensure fan-out threads are always terminated.
@@ -345,7 +345,6 @@ impl ExecutorThread {
}
Ok(ExecutorCommand::Shutdown) => {
- Self::shutdown_fanout_threads(&fanout_threads);
break;
}
Err(err) => {
@@ -354,6 +353,8 @@ impl ExecutorThread {
}
}
}
+
+ Self::shutdown_fanout_threads(&fanout_threads);
})
}
