usestd::thread;usecorn::start_chat_server;usecorn::start_web_server;fnmain(){println!("Hello, world!");thread::spawn(||{start_chat_server();});// start a new thread
let handle =thread::spawn(||{start_web_server();});// Waiting for the child thread to complete
// (If not set, the main thread may finish execution before the child thread even starts, causing the child thread's logic to never execute)
handle.join().unwrap();}