()
| 1 | fn main() { |
| 2 | let mut data: u32 = 0; |
| 3 | let mut handles = vec![]; |
| 4 | |
| 5 | for _ in 0..10 { |
| 6 | let h = std::thread::spawn(move || { |
| 7 | for _ in 0..100_000 { |
| 8 | data += 1; |
| 9 | } |
| 10 | println!("{}", data); |
| 11 | }); |
| 12 | |
| 13 | handles.push(h); |
| 14 | } |
| 15 | for h in handles { |
| 16 | h.join().unwrap(); |
| 17 | } |
| 18 | println!("{}", data); |
| 19 | } |
nothing calls this directly
no outgoing calls
no test coverage detected