Fallout from new thread API

This commit is contained in:
Aaron Turon 2014-12-06 18:34:37 -08:00
parent 14c1a103bc
commit 43ae4b3301
51 changed files with 323 additions and 439 deletions

View file

@ -342,10 +342,11 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
let cr = Path::new(cratefile);
info!("starting to run rustc");
let (mut krate, analysis) = std::task::try(move |:| {
let (mut krate, analysis) = std::thread::Thread::with_join(move |:| {
let cr = cr;
core::run_core(libs, cfgs, externs, &cr, triple)
}).map_err(|_| "rustc failed").unwrap();
}).join().map_err(|_| "rustc failed").unwrap();
info!("finished with rustc");
let mut analysis = Some(analysis);
ANALYSISKEY.with(|s| {

View file

@ -16,6 +16,7 @@ use std::os;
use std::str;
use std::string::String;
use std::thunk::Thunk;
use std::thread::Thread;
use std::collections::{HashSet, HashMap};
use testing;
@ -143,7 +144,7 @@ fn runtest(test: &str, cratename: &str, libs: Vec<Path>, externs: core::Externs,
let w1 = io::ChanWriter::new(tx);
let w2 = w1.clone();
let old = io::stdio::set_stderr(box w1);
spawn(move |:| {
Thread::spawn(move |:| {
let mut p = io::ChanReader::new(rx);
let mut err = match old {
Some(old) => {