about summary refs log tree commit diff
path: root/tests/ui/threads-sendsync/task-comm-1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/threads-sendsync/task-comm-1.rs')
-rw-r--r--tests/ui/threads-sendsync/task-comm-1.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/threads-sendsync/task-comm-1.rs b/tests/ui/threads-sendsync/task-comm-1.rs
new file mode 100644
index 00000000000..68ca62909bf
--- /dev/null
+++ b/tests/ui/threads-sendsync/task-comm-1.rs
@@ -0,0 +1,14 @@
+// run-pass
+#![allow(unused_must_use)]
+// ignore-emscripten no threads support
+
+use std::thread;
+
+pub fn main() { test00(); }
+
+fn start() { println!("Started / Finished task."); }
+
+fn test00() {
+    thread::spawn(move|| start() ).join();
+    println!("Completing.");
+}