Skip to content

Instantly share code, notes, and snippets.

@olsonjeffery
Created August 21, 2012 22:47
Show Gist options
  • Select an option

  • Save olsonjeffery/3420097 to your computer and use it in GitHub Desktop.

Select an option

Save olsonjeffery/3420097 to your computer and use it in GitHub Desktop.
minimal test case to repro future_result pipe failure..
use std;
import task::spawn;
import io::println;
import new_future = future::spawn;
fn main() {
println("hello world!");
do spawn {
println("inside the deal");
};
let result = do new_future { 42 };
let result_val = result.get();
println(fmt!{"and we get: %?",result_val});
// this is the one that actually fails...
let foo = do task::try { 50 };
println(fmt!{"try it again %?", foo.get()});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment