面试题答案
一键面试use std::thread;
fn main() {
let thread_name = "my_custom_thread".to_string();
let handle = thread::Builder::new()
.name(thread_name.clone())
.spawn(move || {
println!("This is {}", thread_name);
})
.unwrap();
handle.join().unwrap();
}