Skip to content

Instantly share code, notes, and snippets.

@eholk
Created June 16, 2011 19:03
Show Gist options
  • Select an option

  • Save eholk/1029972 to your computer and use it in GitHub Desktop.

Select an option

Save eholk/1029972 to your computer and use it in GitHub Desktop.
Issue 507 test case
use std;
import std::task::join;
fn grandchild(chan[int] c) {
c <| 42;
}
fn child(chan[int] c) {
auto _grandchild = spawn grandchild(c);
join(_grandchild);
}
fn main() {
let port[int] p = port();
auto _child = spawn child(chan(p));
let int x;
p |> x;
log x;
assert(x == 42);
join(_child);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment