Skip to content

Commit

Permalink
machines: machine: hack around a deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
hnez committed Aug 9, 2024
1 parent 70cc02d commit 8f92f64
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/machines/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,14 @@ impl Machine {
return;
}

match RunDir::new(self, machines) {
// TODO: RunDir calls a method on self that locks inner,
// resulting in a deadlock.
// This should be solved differently.
std::mem::drop(inner);
let run_dir = RunDir::new(self, machines);
let mut inner = self.inner();

match run_dir {
Ok(run_dir) => inner.run_dir = run_dir,
Err(err) => {
error!("Failed to set up run dir for {self}: {err}");
Expand Down

0 comments on commit 8f92f64

Please sign in to comment.