summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_win.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-09-29 14:55:12 +0200
committerAlessandro Portale <alessandro.portale@digia.com>2014-10-15 13:44:17 +0200
commit29ad07d0a486dd234267fce9a0310ad89683b7d1 (patch)
treee5591d23aae95529b746a748d35f98beff51b118 /src/corelib/io/qprocess_win.cpp
parent3edce263fb92ca96f6d7b5f90baf000bb2e0d74a (diff)
Avoid sleeping 100ms in QProcessPrivate::drainOutputPipes()
There is no point in waiting 100 milliseconds after each iteration, as all data that we may possibly read will be already in the pipe. We only need to give the notifier thread a chance to inform us, which is best achieved with a yield. Task-number: QTBUG-41282 Change-Id: Id654b688246508494a5549c11900f9ad2957f192 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/io/qprocess_win.cpp')
-rw-r--r--src/corelib/io/qprocess_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 980fb58865..ee6b7e13f4 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -634,7 +634,7 @@ bool QProcessPrivate::drainOutputPipes()
someReadyReadEmitted |= readyReadEmitted;
if (!readOperationActive || !readyReadEmitted)
break;
- Sleep(100);
+ QThread::yieldCurrentThread();
}
return someReadyReadEmitted;