mirror of
https://github.com/zaphar/durnitisp.git
synced 2025-07-25 18:49:50 -04:00
No nursery for render thread
This commit is contained in:
parent
a6fedfc978
commit
59da2337bd
@ -216,8 +216,6 @@ fn main() -> anyhow::Result<()> {
|
|||||||
});
|
});
|
||||||
parent.schedule(Box::new(connect_thread));
|
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);
|
debug!("attempting to start server on {}", LISTENHOST.flag);
|
||||||
let server = match tiny_http::Server::http(LISTENHOST.flag) {
|
let server = match tiny_http::Server::http(LISTENHOST.flag) {
|
||||||
Ok(server) => server,
|
Ok(server) => server,
|
||||||
@ -226,7 +224,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
*signal = true;
|
*signal = true;
|
||||||
error!("Error starting render thread {}", err);
|
error!("Error starting render thread {}", err);
|
||||||
error!("Shutting down all threads...");
|
error!("Shutting down all threads...");
|
||||||
return;
|
return Err(anyhow::Error::msg(format!("{}", err)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
loop {
|
loop {
|
||||||
@ -249,9 +247,4 @@ fn main() -> anyhow::Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
parent.schedule(Box::new(render_thread));
|
|
||||||
// Blocks forever
|
|
||||||
parent.wait();
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user