Skip to content

Commit 806e0b5

Browse files
committed
Ehh
1 parent 539da48 commit 806e0b5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

czkawka_core/src/tools/bad_extensions/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl BadExtensions {
7070
progress_handler.join_thread();
7171

7272
// Break if stop was clicked
73-
if stop_flag.load(Ordering::Relaxed) {
73+
if check_if_stop_received(stop_flag) {
7474
return WorkContinueStatus::Stop;
7575
}
7676

czkawka_core/src/tools/same_music/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ impl SameMusic {
311311
// Break if stop was clicked after saving to cache
312312

313313
progress_handler.join_thread();
314-
if stop_flag.load(Ordering::Relaxed) {
314+
if check_if_stop_received(stop_flag) {
315315
return WorkContinueStatus::Stop;
316316
}
317317

czkawka_core/src/tools/similar_images/core.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
22
use std::path::{Path, PathBuf};
33
use std::sync::Arc;
4-
use std::sync::atomic::{AtomicBool, Ordering};
4+
use std::sync::atomic::AtomicBool;
55
use std::{mem, panic};
66

77
use bk_tree::BKTree;
@@ -209,7 +209,7 @@ impl SimilarImages {
209209
self.save_to_cache(vec_file_entry, loaded_hash_map);
210210

211211
// Break if stop was clicked after saving to cache
212-
if stop_flag.load(Ordering::Relaxed) {
212+
if check_if_stop_received(stop_flag) {
213213
return WorkContinueStatus::Stop;
214214
}
215215

@@ -386,7 +386,7 @@ impl SimilarImages {
386386
// println!("{hash:?} --- {:?}", vec.iter().map(|e| e.1).collect::<Vec<_>>());
387387
// }
388388

389-
if stop_flag.load(Ordering::Relaxed) {
389+
if check_if_stop_received(stop_flag) {
390390
progress_handler.join_thread();
391391
return WorkContinueStatus::Stop;
392392
}

czkawka_core/src/tools/similar_videos/core.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::collections::{BTreeMap, BTreeSet, HashMap};
22
use std::mem;
33
use std::sync::Arc;
4-
use std::sync::atomic::{AtomicBool, Ordering};
4+
use std::sync::atomic::AtomicBool;
55

66
use crossbeam_channel::Sender;
77
use fun_time::fun_time;
@@ -191,7 +191,7 @@ impl SimilarVideos {
191191
self.save_cache(vec_file_entry, loaded_hash_map);
192192

193193
// Break if stop was clicked after saving to cache
194-
if stop_flag.load(Ordering::Relaxed) {
194+
if check_if_stop_received(stop_flag) {
195195
return WorkContinueStatus::Stop;
196196
}
197197

0 commit comments

Comments
 (0)