Skip to content

Instantly share code, notes, and snippets.

@robarnold
Created July 15, 2011 01:36
Show Gist options
  • Save robarnold/1083866 to your computer and use it in GitHub Desktop.
Save robarnold/1083866 to your computer and use it in GitHub Desktop.
use std;
fn producer(chan[u8[]] c) {
c <| ~[1u8, 2u8, 3u8, 4u8, 5u8, 6u8, 7u8, 8u8, 9u8, 10u8, 11u8, 12u8, 13u8 ];
}
fn main() {
let port[u8[]] p = port();
let task prod = spawn producer(chan(p));
let u8[] data;
p |> data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment