From 683c66d81898e1d7d4cb814a5740169529c3313e Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 19 Sep 2022 18:26:36 -0400 Subject: Scanning can now be cancelled. Fix terminate() of thread pool blocking if wait() is already called. --- qdeduper/sigdb_qt.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qdeduper/sigdb_qt.cpp') diff --git a/qdeduper/sigdb_qt.cpp b/qdeduper/sigdb_qt.cpp index 692f9c7..67cc3e6 100644 --- a/qdeduper/sigdb_qt.cpp +++ b/qdeduper/sigdb_qt.cpp @@ -91,6 +91,11 @@ void SignatureDB::scan_files(const std::vector &files, int njobs) create_priv_struct(); } +void SignatureDB::interrupt_scan() +{ + if (sdb) + sdb->populate_interrupt(); +} size_t SignatureDB::num_groups() { -- cgit v1.2.3