2010-08-11 15:05:33 -07:00
|
|
|
io fn start(chan[chan[str]] c) {
|
|
|
|
let port[str] p = port();
|
|
|
|
c <| chan(p);
|
|
|
|
auto a <- p;
|
2010-08-11 16:08:26 -07:00
|
|
|
// auto b <- p; // Never read the second string.
|
2010-08-11 15:05:33 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
io fn main() {
|
|
|
|
let port[chan[str]] p = port();
|
|
|
|
auto child = spawn "start" start(chan(p));
|
|
|
|
auto c <- p;
|
|
|
|
c <| "A";
|
|
|
|
c <| "B";
|
|
|
|
yield;
|
|
|
|
}
|