mirror of
https://github.com/zaphar/durnitisp.git
synced 2025-07-22 18:19:48 -04:00
Revert "No nursery for render thread"
This reverts commit 59da2337bd8076b147e4eb76f7ad82d17ac0c8c2.
This commit is contained in:
parent
59da2337bd
commit
e9d4a770d3
@ -216,6 +216,8 @@ 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,
|
||||
@ -224,7 +226,7 @@ fn main() -> anyhow::Result<()> {
|
||||
*signal = true;
|
||||
error!("Error starting render thread {}", err);
|
||||
error!("Shutting down all threads...");
|
||||
return Err(anyhow::Error::msg(format!("{}", err)));
|
||||
return;
|
||||
}
|
||||
};
|
||||
loop {
|
||||
@ -247,4 +249,9 @@ fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
parent.schedule(Box::new(render_thread));
|
||||
// Blocks forever
|
||||
parent.wait();
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user