rust/src/test/ui/yield2.rs
2019-07-27 18:56:16 +03:00

9 lines
148 B
Rust

// run-pass
use std::thread;
pub fn main() {
let mut i: isize = 0;
while i < 100 { i = i + 1; println!("{}", i); thread::yield_now(); }
}