Skip to content

Instantly share code, notes, and snippets.

@codahale
Created July 21, 2013 02:09
Show Gist options
  • Save codahale/6047209 to your computer and use it in GitHub Desktop.
Save codahale/6047209 to your computer and use it in GitHub Desktop.
fn main() {
let (port, chan): (Port<int>, Chan<int>) = stream();
let mut i = 0;
while i < 30 {
do spawn {
chan.send(1);
}
i += 1;
}
loop {
let v = port.recv();
print(fmt!("I am child number %?\n", v));
}
}
rust: task failed at 'option::unwrap none', /opt/local/var/macports/build/_opt_mports_dports_lang_rust/rust/work/rust-0.7/src/libstd/option.rs:277
rust: task failed at 'option::unwrap none', /opt/local/var/macports/build/_opt_mports_dports_lang_rust/rust/work/rust-0.7/src/libstd/option.rs:277
rust: task failed at 'option::unwrap none', /opt/local/var/macports/build/_opt_mports_dports_lang_rust/rust/work/rust-0.7/src/libstd/option.rs:277
rust: task failed at 'option::unwrap none', /opt/local/var/macports/build/_opt_mports_dports_lang_rust/rust/work/rust-0.7/src/libstd/option.rs:277
rust: task failed at 'option::unwrap none', /opt/local/var/macports/build/_opt_mports_dports_lang_rust/rust/work/rust-0.7/src/libstd/option.rs:277
rust: task failed at 'option::unwrap none', /opt/local/var/macports/build/_opt_mports_dports_lang_rust/rust/work/rust-0.7/src/libstd/option.rs:277
I am child number 1
rust: task failed at 'connection closed', /opt/local/var/macports/build/_opt_mports_dports_lang_rust/rust/work/rust-0.7/src/libstd/option.rs:307
rust: task failed at 'option::unwrap none', /opt/local/var/macports/build/_opt_mports_dports_lang_rust/rust/work/rust-0.7/src/libstd/option.rs:277
rust: domain main @0x7fc6ea800010 root task failed
[Finished in 0.0s with exit code 101]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment