Skip to content

Commit

Permalink
Fix var typo in producer-consumer threading example (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpe5 authored Feb 8, 2024
1 parent 664f49d commit 29fc5d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/threading/producer-consumer.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use std::time::Duration;
fn main() {
let (tx, rx) = mpsc::channel();

let procuder = thread::spawn(move || {
let producer = thread::spawn(move || {
for n in 1..10 {
tx.send(format!("Message #{}", n)).unwrap();
}
Expand All @@ -51,7 +51,7 @@ fn main() {
println!("{}", received);
}

procuder.join().unwrap();
producer.join().unwrap();
}
```

Expand Down

0 comments on commit 29fc5d7

Please sign in to comment.