summaryrefslogtreecommitdiffstats
path: root/src/test/ui/threads-sendsync/yield2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/threads-sendsync/yield2.rs')
-rw-r--r--src/test/ui/threads-sendsync/yield2.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/threads-sendsync/yield2.rs b/src/test/ui/threads-sendsync/yield2.rs
new file mode 100644
index 000000000..376faab0c
--- /dev/null
+++ b/src/test/ui/threads-sendsync/yield2.rs
@@ -0,0 +1,8 @@
+// run-pass
+
+use std::thread;
+
+pub fn main() {
+ let mut i: isize = 0;
+ while i < 100 { i = i + 1; println!("{}", i); thread::yield_now(); }
+}