mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
Give extract thread more time to gracefully terminate on cancellation
Embedded build does not deal well with threads being forcefully terminated. So wait 10 seconds instead of 2 before resorting to that.
This commit is contained in:
parent
0f6115e3a5
commit
4b71b5c305
1 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ DownloadExtractThread::~DownloadExtractThread()
|
||||||
{
|
{
|
||||||
_cancelled = true;
|
_cancelled = true;
|
||||||
_cancelExtract();
|
_cancelExtract();
|
||||||
if (!_extractThread->wait(2000))
|
if (!_extractThread->wait(10000))
|
||||||
{
|
{
|
||||||
_extractThread->terminate();
|
_extractThread->terminate();
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ void DownloadExtractThread::_cancelExtract()
|
||||||
_queue.clear();
|
_queue.clear();
|
||||||
_queue.push_back(QByteArray());
|
_queue.push_back(QByteArray());
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
_cv.notify_one();
|
_cv.notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DownloadExtractThread::cancelDownload()
|
void DownloadExtractThread::cancelDownload()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue