QWindowsPipeWriter could terminate the process to early

When the QWindowsPipeWriter is deleted it will wait
for the thread to exit. This wait was set to 100 ms
which will not always be enough time for the thread
to exit, in that case the thread will be terminated.
This will increase the timeout to 30 seconds that
should be more then enough time for the thread to exit
by itself.

Task-number: QTBUG-4425
Change-Id: I9b1910c0213376c622c091be050df2a1c4c6b190
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
Martin Petersson 2012-02-23 13:18:47 +01:00 committed by Qt by Nokia
parent 2b23d7214f
commit 031389e62e

View File

@ -67,7 +67,7 @@ QWindowsPipeWriter::~QWindowsPipeWriter()
quitNow = true;
waitCondition.wakeOne();
lock.unlock();
if (!wait(100))
if (!wait(30000))
terminate();
#if !defined(Q_OS_WINCE) || (_WIN32_WCE >= 0x600)
CloseHandle(writePipe);