No nursery for render thread

This commit is contained in:
Jeremy Wall 2020-07-28 19:17:58 -04:00
parent a6fedfc978
commit 59da2337bd

View File

@ -216,8 +216,6 @@ fn main() -> anyhow::Result<()> {
});
parent.schedule(Box::new(connect_thread));
}
let stop_signal = stop_signal.clone();
let render_thread = thread::Pending::new(move || {
debug!("attempting to start server on {}", LISTENHOST.flag);
let server = match tiny_http::Server::http(LISTENHOST.flag) {
Ok(server) => server,
@ -226,7 +224,7 @@ fn main() -> anyhow::Result<()> {
*signal = true;
error!("Error starting render thread {}", err);
error!("Shutting down all threads...");
return;
return Err(anyhow::Error::msg(format!("{}", err)));
}
};
loop {
@ -249,9 +247,4 @@ fn main() -> anyhow::Result<()> {
}
}
}
});
parent.schedule(Box::new(render_thread));
// Blocks forever
parent.wait();
Ok(())
}