mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-12 04:44:52 +00:00
break when there's nothing to read
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
This commit is contained in:
parent
5b6b74e21d
commit
6d9515578f
@ -922,6 +922,8 @@ fn shard_manager(
|
|||||||
if let Ok(n) = stdin.read(&mut buffer) {
|
if let Ok(n) = stdin.read(&mut buffer) {
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
let _ = pstdin.write_all(&buffer[..n]);
|
let _ = pstdin.write_all(&buffer[..n]);
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1063,6 +1065,8 @@ fn log_lines<R: Sized + Read>(mut bufread: BufReader<R>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user