Skip to content

Commit

Permalink
fix(execution): multi-threaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeromos Kovacs committed Jul 4, 2024
1 parent 261244f commit 87856b7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ fn main() {
// collecting cli args
let args = std::env::args().collect::<Vec<_>>();

let mut handles = vec![];
for file in args.iter().skip(1) {
fit2gpx(file);
let file = file.clone();
let jh = std::thread::spawn(move || {
fit2gpx(&file);
});
handles.push(jh);
}
for handle in handles {
handle.join().unwrap();
}
}

Expand Down

0 comments on commit 87856b7

Please sign in to comment.