Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::thread::spawn;
- fn main() {
- let cow = "toshii";
- (0..).map(|i| spawn(move || {println!("hi {} {}", cow, i);})).take(99).collect::<Vec<_>>().into_iter().for_each(|t| t.join().unwrap());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement