fix stdout hangged on (#6715)

This commit is contained in:
WindSoilder
2022-10-16 03:29:29 +08:00
committed by GitHub
parent de77cb0cc4
commit a498234f1d
4 changed files with 139 additions and 101 deletions

View File

@ -440,7 +440,7 @@ impl PipelineData {
{
// NOTE: currently we don't need anything from stderr
// so directly consumes `stderr_stream` to make sure that everything is done.
let _ = stderr_stream.map(|x| x.into_bytes());
std::thread::spawn(move || stderr_stream.map(|x| x.into_bytes()));
if let Some(stream) = stream {
for s in stream {
let s_live = s?;