mirror of
https://github.com/sreedevk/deduplicator.git
synced 2026-08-31 20:45:34 +00:00
fix: proc count decrement added
This commit is contained in:
@@ -39,6 +39,7 @@ impl Scanner {
|
||||
self.proc_count.fetch_add(1, Relaxed);
|
||||
let copy_of_queue = self.proc_queue.clone();
|
||||
let copy_of_files = self.files.clone();
|
||||
let copy_of_proc_count = self.proc_count.clone();
|
||||
|
||||
self.threadpool.execute(move || {
|
||||
if let Ok((files, dirs)) = Self::scan(path) {
|
||||
@@ -46,6 +47,7 @@ impl Scanner {
|
||||
let mut f = copy_of_files.lock().unwrap();
|
||||
q.extend(files);
|
||||
f.extend(dirs);
|
||||
copy_of_proc_count.fetch_sub(1, Relaxed);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user