File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ impl BadExtensions {
70
70
progress_handler. join_thread ( ) ;
71
71
72
72
// Break if stop was clicked
73
- if stop_flag . load ( Ordering :: Relaxed ) {
73
+ if check_if_stop_received ( stop_flag ) {
74
74
return WorkContinueStatus :: Stop ;
75
75
}
76
76
Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ impl SameMusic {
311
311
// Break if stop was clicked after saving to cache
312
312
313
313
progress_handler. join_thread ( ) ;
314
- if stop_flag . load ( Ordering :: Relaxed ) {
314
+ if check_if_stop_received ( stop_flag ) {
315
315
return WorkContinueStatus :: Stop ;
316
316
}
317
317
Original file line number Diff line number Diff line change 1
1
use std:: collections:: { BTreeMap , BTreeSet , HashMap , HashSet } ;
2
2
use std:: path:: { Path , PathBuf } ;
3
3
use std:: sync:: Arc ;
4
- use std:: sync:: atomic:: { AtomicBool , Ordering } ;
4
+ use std:: sync:: atomic:: AtomicBool ;
5
5
use std:: { mem, panic} ;
6
6
7
7
use bk_tree:: BKTree ;
@@ -209,7 +209,7 @@ impl SimilarImages {
209
209
self . save_to_cache ( vec_file_entry, loaded_hash_map) ;
210
210
211
211
// Break if stop was clicked after saving to cache
212
- if stop_flag . load ( Ordering :: Relaxed ) {
212
+ if check_if_stop_received ( stop_flag ) {
213
213
return WorkContinueStatus :: Stop ;
214
214
}
215
215
@@ -386,7 +386,7 @@ impl SimilarImages {
386
386
// println!("{hash:?} --- {:?}", vec.iter().map(|e| e.1).collect::<Vec<_>>());
387
387
// }
388
388
389
- if stop_flag . load ( Ordering :: Relaxed ) {
389
+ if check_if_stop_received ( stop_flag ) {
390
390
progress_handler. join_thread ( ) ;
391
391
return WorkContinueStatus :: Stop ;
392
392
}
Original file line number Diff line number Diff line change 1
1
use std:: collections:: { BTreeMap , BTreeSet , HashMap } ;
2
2
use std:: mem;
3
3
use std:: sync:: Arc ;
4
- use std:: sync:: atomic:: { AtomicBool , Ordering } ;
4
+ use std:: sync:: atomic:: AtomicBool ;
5
5
6
6
use crossbeam_channel:: Sender ;
7
7
use fun_time:: fun_time;
@@ -191,7 +191,7 @@ impl SimilarVideos {
191
191
self . save_cache ( vec_file_entry, loaded_hash_map) ;
192
192
193
193
// Break if stop was clicked after saving to cache
194
- if stop_flag . load ( Ordering :: Relaxed ) {
194
+ if check_if_stop_received ( stop_flag ) {
195
195
return WorkContinueStatus :: Stop ;
196
196
}
197
197
You can’t perform that action at this time.
0 commit comments