aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/task-comm-10.rs
diff options
context:
space:
mode:
authorMichael Bebenita <[email protected]>2010-08-11 15:05:33 -0700
committerMichael Bebenita <[email protected]>2010-08-11 16:08:45 -0700
commit8ac15c684481ea5b60f85c3f57b63e89a261e7dd (patch)
tree46755714cf321a466d08926b3b62e7d8c61db0d2 /src/test/run-pass/task-comm-10.rs
parentMade ref_count a word sized value. (diff)
downloadrust-8ac15c684481ea5b60f85c3f57b63e89a261e7dd.tar.xz
rust-8ac15c684481ea5b60f85c3f57b63e89a261e7dd.zip
Added test cases.
Diffstat (limited to 'src/test/run-pass/task-comm-10.rs')
-rw-r--r--src/test/run-pass/task-comm-10.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/run-pass/task-comm-10.rs b/src/test/run-pass/task-comm-10.rs
new file mode 100644
index 00000000..529ef6f5
--- /dev/null
+++ b/src/test/run-pass/task-comm-10.rs
@@ -0,0 +1,16 @@
+io fn start(chan[chan[str]] c) {
+ let port[str] p = port();
+ c <| chan(p);
+ auto a <- p;
+ auto b <- p;
+ // Never read the second string.
+}
+
+io fn main() {
+ let port[chan[str]] p = port();
+ auto child = spawn "start" start(chan(p));
+ auto c <- p;
+ c <| "A";
+ c <| "B";
+ yield;
+} \ No newline at end of file