[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - kit/Kit.cpp
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 29 08:18:46 UTC 2020
kit/Kit.cpp | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 2d39e461200eae060e0bb7220d21972dd8076ea6
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Jul 16 19:10:05 2020 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jul 29 10:18:28 2020 +0200
Process any pending tileQueue items first.
Change-Id: I078bc1f52ba7647ca1715ea3222d695936dd657f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98928
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
(cherry picked from commit 0084c3b275bbbad7f3ee2d36f86afc10fbc5400c)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98956
Tested-by: Andras Timar <andras.timar at collabora.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 4d20d27b4..09b003efc 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1928,11 +1928,16 @@ private:
}
public:
+ bool hasQueueItems() const
+ {
+ return _tileQueue && !_tileQueue->isEmpty();
+ }
+
void drainQueue(const std::chrono::steady_clock::time_point &/*now*/)
{
try
{
- while (!_tileQueue->isEmpty())
+ while (hasQueueItems())
{
if (_stop || SigUtil::getTerminationFlag())
{
@@ -2201,7 +2206,10 @@ public:
_pollEnd = std::chrono::steady_clock::now() + std::chrono::microseconds(timeoutMicroS);
do
{
- if (poll(timeoutMicroS) <= 0)
+ int realTimeout = timeoutMicroS;
+ if (_document && _document->hasQueueItems())
+ realTimeout = 0;
+ if (poll(realTimeout) <= 0)
break;
const auto now = std::chrono::steady_clock::now();
More information about the Libreoffice-commits
mailing list