From 8360f2c95140beeda41927e77070a1114a448fe3 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 3 May 2019 18:05:48 +0100 Subject: [PATCH] unipoll: process lots of events at once. Change-Id: I8b0a37d114a55e5d64d7e5dd7df6c494971087ca --- kit/Kit.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kit/Kit.cpp b/kit/Kit.cpp index 6ac59e84d..c75047a8e 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -2334,9 +2334,7 @@ int pollCallback(void* pData, int timeoutUs) return 0; // The maximum number of extra events to process beyond the first. - //FIXME: When processing more than one event, full-document - //FIXME: invalidations happen (for some reason), so disable for now. - int maxExtraEvents = 0; + int maxExtraEvents = 15; int eventsSignalled = 0; int timeoutMs = timeoutUs / 1000; @@ -2367,7 +2365,7 @@ int pollCallback(void* pData, int timeoutUs) timeoutMs -= elapsedTimeMs; ++eventsSignalled; } - while (maxExtraEvents-- > 0); + while (!TerminationFlag && maxExtraEvents-- > 0); } if (document)