mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-13 19:26:02 +00:00
Improve speed of process termination on exit
This commit is contained in:
@@ -130,8 +130,12 @@ private:
|
||||
emit computerStateChanged(m_Computer);
|
||||
}
|
||||
|
||||
// Wait a bit to poll again
|
||||
QThread::sleep(3);
|
||||
// Wait a bit to poll again, but do it in 100 ms chunks
|
||||
// so we can be interrupted reasonably quickly.
|
||||
// FIXME: QWaitCondition would be better.
|
||||
for (int i = 0; i < 30 && !isInterruptionRequested(); i++) {
|
||||
QThread::msleep(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user