aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/threadedwork.py
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-11-29 10:28:24 +0100
committerEike Ziller <eike.ziller@qt.io>2019-12-16 11:04:22 +0000
commitddfc8a28149d5fe5adeeddec2bcc02319e6fc2ba (patch)
tree4cc99335fcb28a6883f501ab612d1703d32db5e4 /packaging-tools/threadedwork.py
parent151a50a187aa233656e904220fa4f58261ce2c63 (diff)
Flush stdout after printing information about starting processes
Otherwise the output will be printed at an arbitrary point in time, and in arbitrary order wrt stderr output. Change-Id: Ic989387eb2dfd4373f5187e5604f2f688b63373a Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'packaging-tools/threadedwork.py')
-rw-r--r--packaging-tools/threadedwork.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/packaging-tools/threadedwork.py b/packaging-tools/threadedwork.py
index b47d66fc9..9afb93eb0 100644
--- a/packaging-tools/threadedwork.py
+++ b/packaging-tools/threadedwork.py
@@ -95,11 +95,17 @@ class StdOutHook:
sys.__stdout__.write(newOutput + cleanerString)
+ def flush(self):
+ sys.__stdout__.flush()
+
class StdErrHook:
def write(self, text):
with outputLock:
sys.__stderr__.write(text)
+ def flush(self):
+ sys.__stderr__.flush()
+
# builtin print() isn't threadsafe, lets make it threadsafe
def threadedPrint(*a, **b):
with outputLock: