Skip to content

Instantly share code, notes, and snippets.

@eholk
Created July 22, 2011 22:46
Show Gist options
  • Select an option

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

Select an option

Save eholk/1100608 to your computer and use it in GitHub Desktop.
use std;
import std::task;
fn start(chan[chan[str]] c) {
let port[str] p;
p = port();
c <| chan(p);
}
fn main() {
let port[chan[str]] p;
auto child;
p = port();
child = spawn start(chan(p));
p |> c;
task::yield();
auto c;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment