From 7d83f965d620ccebeda9a7451cdbb2e40ed88c24 Mon Sep 17 00:00:00 2001 From: Thomas Hurst Date: Sat, 19 Mar 2022 19:40:02 +0000 Subject: Improve aggregate progress reporting Previously, aggregate mode progress reports were handled by an infinitely-looping thread carrying a 64-bit atomic of the current count, which it would print periodically. This resulted in #99 - breaking on platforms without 64-bit atomics, for which a feature was added to disable it. It also implied a race condition, where the "Enumerating ..." message could be printed after results had been gathered but before dua exited. Additionally, part of the status message could be left on the display if the first line of a report was too short to cover it. This commit should resolve these: * The 64-bit atomic counter is replaced with an 8-bit AtomicBool * All printing is controlled from the main thread * The first line is cleared prior to printing a report The only notable drawback I see with this approach is that progress reporting can sometimes be delayed, since the display is only evaluated for update during periods the aggregation loop makes progress. The practical difference appears relatively minor. Since this should resolve #99, the aggregate-scan-progress feature is removed. --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ed30476..7766ad2 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,6 @@ check:## run cargo-check with various features cargo check --no-default-features --features tui-unix cargo check --no-default-features --features tui-crossplatform cargo check --no-default-features --features trash-move - cargo check --no-default-features --features aggregate-scan-progress unit-tests: ## run all unit tests cargo test --all -- cgit v1.2.3