From b4fa88eab5e33443a7d496cef1c4362499a44f63 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 18 Apr 2024 14:10:32 +0200 Subject: [PATCH] =?UTF-8?q?knapp=20aber=20knapp=20hei=C3=9Ft=20eben=20nich?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bin/bench/cli.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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() {