From cacf8d212b7daacb9afdc56e6759ab8e78d2afd1 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sat, 19 Aug 2023 22:58:10 +0200 Subject: [PATCH] Remove sync() call in progress class --- include/dwarfs/progress.h | 6 ------ src/dwarfs/scanner.cpp | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/dwarfs/progress.h b/include/dwarfs/progress.h index d06c94dd..7dfc3d3b 100644 --- a/include/dwarfs/progress.h +++ b/include/dwarfs/progress.h @@ -57,12 +57,6 @@ class progress { unsigned interval_ms); ~progress() noexcept; - template - void sync(T&& func) { - std::unique_lock lock(mx_); - func(); - } - std::shared_ptr create_context(std::string const& name) const; std::vector> get_active_contexts() const; diff --git a/src/dwarfs/scanner.cpp b/src/dwarfs/scanner.cpp index 0a5edd08..ac5e38c6 100644 --- a/src/dwarfs/scanner.cpp +++ b/src/dwarfs/scanner.cpp @@ -749,7 +749,7 @@ void scanner_::scan( prog.set_status_function([](progress const&, size_t) { return "waiting for block compression to finish"; }); - prog.sync([&] { prog.current.store(nullptr); }); + prog.current.store(nullptr); // this is actually needed root->set_name(std::string());