Skip to content

Commit 768306b

Browse files
committed
Add test for #783. Closes #783
1 parent 9b9fc33 commit 768306b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/test/run-pass/issue-783.rs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
use std;
2+
import std::comm::*;
3+
import std::task::*;
4+
5+
fn a(&&_args: ()) {
6+
fn doit() {
7+
fn b(c: chan<chan<int>>) {
8+
let p = port();
9+
send(c, chan(p));
10+
}
11+
let p = port();
12+
spawn(chan(p), b);
13+
recv(p);
14+
}
15+
let i = 0;
16+
while i < 100 {
17+
doit();
18+
i += 1;
19+
}
20+
}
21+
22+
fn main() {
23+
let t = spawn_joinable((), a);
24+
join(t);
25+
}

0 commit comments

Comments
 (0)