rust/src/libstd/io
Alex Crichton f09592a5d1 io: Implement process wait timeouts
This implements set_timeout() for std::io::Process which will affect wait()
operations on the process. This follows the same pattern as the rest of the
timeouts emerging in std::io::net.

The implementation was super easy for everything except libnative on unix
(backwards from usual!), which required a good bit of signal handling. There's a
doc comment explaining the strategy in libnative. Internally, this also required
refactoring the "helper thread" implementation used by libnative to allow for an
extra helper thread (not just the timer).

This is a breaking change in terms of the io::Process API. It is now possible
for wait() to fail, and subsequently wait_with_output(). These two functions now
return IoResult<T> due to the fact that they can time out.

Additionally, the wait_with_output() function has moved from taking `&mut self`
to taking `self`. If a timeout occurs while waiting with output, the semantics
are undesirable in almost all cases if attempting to re-wait on the process.
Equivalent functionality can still be achieved by dealing with the output
handles manually.

[breaking-change]

cc #13523
2014-05-13 17:27:42 -07:00
..
net Document a possible way in which connect_timout may change in the future 2014-05-12 21:41:48 -07:00
buffered.rs core: Add unwrap()/unwrap_err() methods to Result 2014-05-07 08:16:14 -07:00
comm_adapters.rs Replace most ~exprs with 'box'. #11779 2014-05-02 23:00:58 -07:00
extensions.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
flate.rs Remove eof() from io::Reader 2014-01-09 09:27:10 -08:00
fs.rs Add stat method to std::io::fs::File to stat without a Path. 2014-05-12 19:52:29 -07:00
mem.rs Replace most ~exprs with 'box'. #11779 2014-05-02 23:00:58 -07:00
mod.rs auto merge of #13919 : thomaslee/rust/thomaslee_proposed_tcpstream_open, r=alexcrichton 2014-05-12 23:11:45 -07:00
pipe.rs librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00
process.rs io: Implement process wait timeouts 2014-05-13 17:27:42 -07:00
result.rs De-~[] Mem{Reader,Writer} 2014-04-06 15:40:01 -07:00
signal.rs librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00
stdio.rs core: Add unwrap()/unwrap_err() methods to Result 2014-05-07 08:16:14 -07:00
tempfile.rs core: Add unwrap()/unwrap_err() methods to Result 2014-05-07 08:16:14 -07:00
test.rs rustc: Don't allow priv use to shadow pub use 2014-04-10 15:22:01 -07:00
timer.rs core: Move Option::expect to libstd from libcore 2014-05-07 08:17:32 -07:00
util.rs std: Implement the Buffer trait for some wrappers 2014-05-07 08:11:19 -07:00