Closed
Description
The following program hangs forever in trying to destroy the to_child chan, because it's waiting for the queue to be emptied by the child, which has completed and will never do so.
io fn incomplete_read(chan[chan[str]] for_incoming_chan) {
let port[str] incoming = port();
for_incoming_chan <| chan(incoming);
auto read_one <- incoming;
// Never read the second string.
}
io fn main() {
let port[chan[str]] get_to_child = port();
auto child = spawn incomplete_read(chan(get_to_child));
let chan[str] to_child <- get_to_child;
to_child <| "str 1";
to_child <| "never read";
}
Metadata
Metadata
Assignees
Labels
No labels