diff options
| author | Kornel <kornel@geekhood.net> | 2021-03-09 18:30:39 +0000 |
|---|---|---|
| committer | Kornel <kornel@geekhood.net> | 2021-03-09 20:47:23 +0000 |
| commit | ce2d95cd75adb5f75921536191b4dcfa41be1eff (patch) | |
| tree | 5a364eb64b8044c722b1dc6ef46ff9db1b3ec53f /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 3a5d45f68cadc8fff4fbb557780f92b403b19c19 (diff) | |
| download | rust-ce2d95cd75adb5f75921536191b4dcfa41be1eff.tar.gz rust-ce2d95cd75adb5f75921536191b4dcfa41be1eff.zip | |
Demonstrate best practice for feeding stdin of a child processes
It's possible to create a deadlock with stdin/stdout I/O on a single thread: * the child process may fill its stdout buffer, and have to wait for the parent process to read it, * but the parent process may be waiting until its stdin write finishes before reading the stdout. Therefore, the parent process should use separate threads for writing and reading.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
