diff --git a/src/bin/bench/cli.rs b/src/bin/bench/cli.rs index 877b2d8..3c5f265 100644 --- a/src/bin/bench/cli.rs +++ b/src/bin/bench/cli.rs @@ -2,8 +2,6 @@ // #![warn(missing_docs)] #![warn(missing_debug_implementations)] -use std::sync::Arc; - use clap::Parser; use libpt::log::*; use tokio; @@ -66,8 +64,9 @@ async fn main() -> anyhow::Result<()> { trace!("{bench:#?}"); let n = cli.n; - let in_progress_bench = tokio::spawn( async move { - bench.bench(n) + let bench2 = bench.clone(); + let in_progress_bench = tokio::spawn(async move { + bench2.bench(n).await }); while !bench.is_finished() {