Reduce the priority of background polling threads
This commit is contained in:
parent
c5ca672865
commit
4bbd02fb2d
1 changed files with 7 additions and 0 deletions
|
|
@ -74,6 +74,13 @@ private:
|
||||||
|
|
||||||
void run() override
|
void run() override
|
||||||
{
|
{
|
||||||
|
// Reduce the power and performance impact of our
|
||||||
|
// computer status polling while it's running.
|
||||||
|
setPriority(QThread::LowPriority);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
|
||||||
|
setServiceLevel(QThread::QualityOfService::Eco);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Always fetch the applist the first time
|
// Always fetch the applist the first time
|
||||||
int pollsSinceLastAppListFetch = POLLS_PER_APPLIST_FETCH;
|
int pollsSinceLastAppListFetch = POLLS_PER_APPLIST_FETCH;
|
||||||
while (!isInterruptionRequested()) {
|
while (!isInterruptionRequested()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue