Shut down worker threads when done

This commit is contained in:
Richard Feldman 2020-07-30 18:42:18 -04:00
parent 52dc4e9a03
commit 4968cd861e

View file

@ -417,7 +417,12 @@ fn load_deps<'a>(
// We're done!
debug_assert!(msg_rx.is_empty());
dbg!("TODO send Shutdown messages to all the worker threads.");
// Shut down all the worker threads.
for listener in worker_listeners {
listener
.send(WorkerMsg::Shutdown)
.map_err(|_| LoadingProblem::MsgChannelDied)?;
}
state.type_problems.extend(problems);