Skip to content

Commit

Permalink
remove artefact from previous shutdown mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
agourlay committed Sep 28, 2024
1 parent 0aaa732 commit 9dd5938
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/password_finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ pub fn password_finder(

// stop signals to shut down threads
let stop_workers_signal = Arc::new(AtomicBool::new(false));
let stop_gen_signal = Arc::new(AtomicBool::new(false));

let total_password_count = match strategy {
GenPasswords {
Expand Down Expand Up @@ -97,8 +96,6 @@ pub fn password_finder(

// wait for password to be found
if let Ok(password_found) = receive_found_password.recv() {
// stop generating values first to avoid deadlock on channel
stop_gen_signal.store(true, Ordering::Relaxed);
// stop workers
stop_workers_signal.store(true, Ordering::Relaxed);
for h in worker_handles {
Expand Down

0 comments on commit 9dd5938

Please sign in to comment.