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@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
This commit is contained in:
parent
95d683f6ab
commit
0084c3b275
1 changed files with 10 additions and 2 deletions
12
kit/Kit.cpp
12
kit/Kit.cpp
|
@ -1386,11 +1386,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())
|
||||
{
|
||||
|
@ -1679,7 +1684,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();
|
||||
|
|
Loading…
Reference in a new issue