Skip to content

Commit

Permalink
core: Fix pending post_up by launching separate threads
Browse files Browse the repository at this point in the history
  • Loading branch information
nrybowski committed Feb 10, 2025
1 parent 227b7ee commit 2fcaf80
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions dune-core/src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,20 +791,20 @@ impl Node {
.join();
});

let _ = thread::scope(|scope| {
// Launch post_up commands, if any.
if let Some(post_ups) = &pinned.post_up {
let _span = span!(Level::INFO, "pinned");
info!("Launching <{}> post_up commands", post_ups.len());
post_ups.iter().for_each(|post_up| {
// Launch post_up commands, if any.
if let Some(post_ups) = &pinned.post_up {
let _span = span!(Level::INFO, "pinned");
info!("Launching <{}> post_up commands", post_ups.len());
post_ups.iter().for_each(|post_up| {
let _ = thread::scope(|scope| {
let _ = scope
.spawn(move || {
_sync_exec(&post_up);
_async_exec(&post_up);
})
.join();
});
}
});
});
}
}
});
}
Expand Down

0 comments on commit 2fcaf80

Please sign in to comment.