add thread test

This commit is contained in:
2020-01-24 17:21:50 +08:00
parent f3c37d8823
commit 2de571c179
2 changed files with 19 additions and 0 deletions

10
thread-test/src/main.rs Normal file
View File

@@ -0,0 +1,10 @@
use std::thread;
// https://zhuanlan.zhihu.com/p/89716165
fn main() {
let child = thread::spawn(move || {
println!("Hello World!");
});
let _res = child.join().unwrap();
println!("Finished!");
}