This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::thread; | |
use std::time::Duration; | |
let handles: Vec<_> = (0..100) | |
.map(|num| { | |
thread::spawn(move || { | |
thread::sleep(Duration::from_secs(1)); | |
println!("value of {}", num); | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Computer Information: | |
Manufacturer: HUAWEI | |
Model: BOHK-WAX9X-PCB | |
Form Factor: Laptop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: AuthenticAMD | |
CPU Brand: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx | |
CPU Family: 0x17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mut number = String::new(); | |
io::stdin() | |
.read_line(&mut number) | |
.expect("Failed to read input"); |