about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorKornel <kornel@geekhood.net>2021-03-09 18:30:39 +0000
committerKornel <kornel@geekhood.net>2021-03-09 20:47:23 +0000
commitce2d95cd75adb5f75921536191b4dcfa41be1eff (patch)
tree5a364eb64b8044c722b1dc6ef46ff9db1b3ec53f /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent3a5d45f68cadc8fff4fbb557780f92b403b19c19 (diff)
downloadrust-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