diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-02-12 10:29:25 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-03-09 10:12:36 -0800 |
| commit | 7c3038f82477491e20c6f80c0139ddb1f1b912ca (patch) | |
| tree | 915cb9e7c39365463e0c5ca2391e985dc72730b6 /src/rustllvm/RustWrapper.cpp | |
| parent | 6afa32a2504fa90b48f74979bb4061cb397e9270 (diff) | |
| download | rust-7c3038f82477491e20c6f80c0139ddb1f1b912ca.tar.gz rust-7c3038f82477491e20c6f80c0139ddb1f1b912ca.zip | |
std: Don't spawn threads in `wait_with_output`
Semantically there's actually no reason for us to spawn threads as part of the call to `wait_with_output`, and that's generally an incredibly heavyweight operation for just reading a few bytes (especially when stderr probably rarely has bytes!). An equivalent operation in terms of what's implemented today would be to just drain both pipes of all contents and then call `wait` on the child process itself. On Unix we can implement this through some convenient use of the `select` function, whereas on Windows we can make use of overlapped I/O. Note that on Windows this requires us to use named pipes instead of anonymous pipes, but they're semantically the same under the hood.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
