Update thread.md

pull/436/head
JiaoXin2005 3 years ago committed by GitHub
parent 6ebd95b0a8
commit a3279c2c9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -185,9 +185,9 @@ fn main() {
use std::thread; use std::thread;
use std::time::Duration; use std::time::Duration;
fn main() { fn main() {
// 创建一个线程 // 创建一个线程A
let new_thread = thread::spawn(move || { let new_thread = thread::spawn(move || {
// 再创建一个线程 // 再创建一个线程B
thread::spawn(move || { thread::spawn(move || {
loop { loop {
println!("I am a new thread."); println!("I am a new thread.");

Loading…
Cancel
Save