Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change the pacing of the logforward thread

It seems that the old pacing method wasn't doing quite what I wanted, and maybe
the queue was getting backed up under stress.  Let's see if we can't make it
a bit better.
  • Loading branch information...
commit f48c4bc2be1c7c36f34257a7daf5472fdf6e3769 1 parent 32d0756
@Beirdo Beirdo authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 mythtv/libs/libmythbase/loggingserver.cpp
View
8 mythtv/libs/libmythbase/loggingserver.cpp
@@ -1005,13 +1005,19 @@ void LogForwardThread::run(void)
}
int processed = 0;
- while (!logMsgList.isEmpty() && processed < 100)
+ while (!logMsgList.isEmpty())
{
processed++;
LogMessage *msg = logMsgList.takeFirst();
lock.unlock();
forwardMessage(msg);
delete msg;
+
+ // Force a processEvents every 128 messages so a busy queue
+ // doesn't preclude timer notifications, etc.
+ if (processed & 127 == 0)
+ qApp->processEvents(QEventLoop::AllEvents, 10);
+
lock.relock();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.