Prevent BlockingOIError from being raised when echonig large amounts of output

This commit is contained in:
Kivi Kaitaniemi
2024-07-28 16:01:46 +03:00
parent 7dacad6be2
commit c091d18ee1
+2 -2
View File
@@ -922,11 +922,11 @@ class _OutputCapturingThread(threading.Thread):
def run(self): def run(self):
while not self.done and not self._stream.closed: while not self.done and not self._stream.closed:
output = self._stream.read() output = self._stream.read(1000)
if output: if output:
output = output.decode() output = output.decode()
self.output += output self.output += output
print(output, end="") print(output, end="", flush=True)
time.sleep(0.1) time.sleep(0.1)