os-rust/tests/ui/threads-sendsync/yield2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
177 B
Rust
Raw Normal View History

//@ run-pass
2015-02-17 15:10:25 -08:00
use std::thread;
pub fn main() {
let mut i: isize = 0;
while i < 100 {
i = i + 1;
println!("{}", i);
thread::yield_now();
}
}