diff --git a/exercises/threads/threads3.rs b/exercises/threads/threads3.rs index d3450668..68c0afa2 100644 --- a/exercises/threads/threads3.rs +++ b/exercises/threads/threads3.rs @@ -3,8 +3,6 @@ // Execute `rustlings hint threads3` or use the `hint` watch subcommand for a // hint. -// I AM NOT DONE - use std::sync::mpsc; use std::sync::Arc; use std::thread; @@ -31,6 +29,7 @@ fn send_tx(q: Queue, tx: mpsc::Sender) -> () { let qc1 = Arc::clone(&qc); let qc2 = Arc::clone(&qc); + // need to clone the producer to achieve multiple producers let tx1 = tx.clone(); thread::spawn(move || { for val in &qc1.first_half {