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

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

9 lines
149 B
Rust
Raw Normal View History

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