Rust
fn hello() {
thread::spawn(|| println!("Hello from thread 1"));
thread::spawn(|| println!("Hello from thread 2"));
}
Or waiting for execution to end
fn hello() {
let t1 = thread::spawn(|| println!("Hello from thread 1"));
let t2 = thread::spawn(|| println!("Hello from thread 2"));
t1.join().expect("t1 failed");
t2.join().expect("t2 failed");
}