Skip to content

Commit

Permalink
Update main.rs
Browse files Browse the repository at this point in the history
As far, as book refers to child thread to count from one to five, it should have enumeration from 1 to 5
  • Loading branch information
I8dNLo authored Jan 6, 2024
1 parent 71352de commit 034262c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::time::Duration;

fn main() {
thread::spawn(|| {
for i in 1..10 {
for i in 1..5 {
println!("hi number {} from the spawned thread!", i);
thread::sleep(Duration::from_millis(1));
}
Expand Down

0 comments on commit 034262c

Please sign in to comment.