mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-08 11:49:19 +00:00
Avoid first thread sleeping 0 millis
This commit is contained in:
parent
1cd661997c
commit
e696f987cd
@ -15,7 +15,7 @@ struct JobStatus {
|
||||
|
||||
fn main() {
|
||||
let status = Arc::new(JobStatus { jobs_completed: 0 });
|
||||
for i in 0..10 {
|
||||
for i in 1..=10 {
|
||||
let status_ref = Arc::clone(&status);
|
||||
thread::spawn(move || {
|
||||
thread::sleep(Duration::from_millis(250 * i));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user