Datasets:

Modalities:
Text
Formats:
text
Size:
< 1K
Libraries:
Datasets
License:
File size: 310 Bytes
998b6cc
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::thread;
use std::time::Duration;

fn main() {
    let handle = thread::spawn(|| {
        println!("Worker thread starting...");
        thread::sleep(Duration::from_secs(1));
        println!("Worker thread finishing.");
    });

    handle.join().unwrap();

    println!("Main thread finishing.");
}