diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-12-06 18:34:37 -0800 | 
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-12-18 23:31:51 -0800 | 
| commit | 43ae4b3301cc0605839778ecf59effb32b752e33 (patch) | |
| tree | aa111f5adc1eaa1e996847e1437d1b1b40821ce0 /src/libstd/io/process.rs | |
| parent | 14c1a103bc3f78721df1dc860a75a477c8275e3a (diff) | |
| download | rust-43ae4b3301cc0605839778ecf59effb32b752e33.tar.gz rust-43ae4b3301cc0605839778ecf59effb32b752e33.zip  | |
Fallout from new thread API
Diffstat (limited to 'src/libstd/io/process.rs')
| -rw-r--r-- | src/libstd/io/process.rs | 11 | 
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs index 9ba6381c8c3..d9acb94714b 100644 --- a/src/libstd/io/process.rs +++ b/src/libstd/io/process.rs @@ -30,6 +30,7 @@ use hash::Hash; use std::hash::sip::SipState; use io::pipe::{PipeStream, PipePair}; use path::BytesContainer; +use thread::Thread; use sys; use sys::fs::FileDesc; @@ -693,10 +694,12 @@ impl Process { fn read(stream: Option<io::PipeStream>) -> Receiver<IoResult<Vec<u8>>> { let (tx, rx) = channel(); match stream { - Some(stream) => spawn(move |:| { - let mut stream = stream; - tx.send(stream.read_to_end()) - }), + Some(stream) => { + Thread::spawn(move |:| { + let mut stream = stream; + tx.send(stream.read_to_end()) + }); + } None => tx.send(Ok(Vec::new())) } rx  | 
