Skip to content

Commit 25ddc51

Browse files
committed
Explicity close() bench lib
Windows has been exhibiting crashes after completion. We hope to explicilty control dll close in order to either prevent problems or get more explicit information on problems.
1 parent 6863dcc commit 25ddc51

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/cli/src/benchmark.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,12 @@ impl BenchmarkCommand {
311311
drop((engine, module));
312312
all_measurements.extend(measurements.finish());
313313
}
314+
315+
// Explicitly close the library to handle any unload errors.
316+
// We log errors but don't fail since measurements have been collected.
317+
if let Err(e) = lib.close() {
318+
log::warn!("Error unloading library: {e}");
319+
}
314320
}
315321

316322
// If we are only benchmarking one phase then filter out any

0 commit comments

Comments
 (0)