fix: join the RNS loop thread before exit and keep the response slot per-request
This commit is contained in:
parent
39c4c4d6a5
commit
234b75651f
17 changed files with 84 additions and 11 deletions
|
|
@ -154,7 +154,12 @@ enum Command {
|
|||
|
||||
fn main() {
|
||||
let cli = Cli::parse();
|
||||
if let Err(e) = run(cli) {
|
||||
let result = run(cli);
|
||||
// The RNS carrier owns a loop thread that must be joined before the
|
||||
// process exits, or it races the teardown of the statics it calls into.
|
||||
#[cfg(feature = "rns")]
|
||||
fumi::rns::stop();
|
||||
if let Err(e) = result {
|
||||
eprintln!("error: {e}");
|
||||
hint(e.downcast_ref::<fumi::error::Error>());
|
||||
std::process::exit(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue