parent
9b9fc33663
commit
768306badd
25
src/test/run-pass/issue-783.rs
Normal file
25
src/test/run-pass/issue-783.rs
Normal file
@ -0,0 +1,25 @@
|
||||
use std;
|
||||
import std::comm::*;
|
||||
import std::task::*;
|
||||
|
||||
fn a(&&_args: ()) {
|
||||
fn doit() {
|
||||
fn b(c: chan<chan<int>>) {
|
||||
let p = port();
|
||||
send(c, chan(p));
|
||||
}
|
||||
let p = port();
|
||||
spawn(chan(p), b);
|
||||
recv(p);
|
||||
}
|
||||
let i = 0;
|
||||
while i < 100 {
|
||||
doit();
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let t = spawn_joinable((), a);
|
||||
join(t);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user