Crear el hilo en rust

Ejemplos de código

0
0

crear el hilo en rust

use std::thread;
use std::time::Duration;

fn main() {
    // create a thread
    thread::spawn(|| {
        for i in 0..5 {
            println!("hi number {} from the spawned thread!", i);
        }
    });
}

Páginas relacionadas

Páginas de ejemplo relacionadas

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................