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>
This commit is contained in:
parent
3edce263fb
commit
29ad07d0a4
@ -634,7 +634,7 @@ bool QProcessPrivate::drainOutputPipes()
|
||||
someReadyReadEmitted |= readyReadEmitted;
|
||||
if (!readOperationActive || !readyReadEmitted)
|
||||
break;
|
||||
Sleep(100);
|
||||
QThread::yieldCurrentThread();
|
||||
}
|
||||
|
||||
return someReadyReadEmitted;
|
||||
|
Loading…
Reference in New Issue
Block a user