summaryrefslogtreecommitdiff
path: root/include/vcl/scheduler.hxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-08-29 10:29:51 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-09-26 13:53:28 +0200
commit9679fb26558ea42e47ac9936cef329115a8fdf65 (patch)
treeeee6c65d50667fc5b9924f98ce8f87a6df9d707a /include/vcl/scheduler.hxx
parent808d048694630303d895e818cfd5fb48c9d16738 (diff)
tdf#112288 Clarify Reschedule implementations
Application::Reschedule(true) must just process all currently pending events and ignore all new events generated while processing them. In contrast to Scheduler::ProcessEventsToIdle, this way it can't busy-lock the application with background jobs. This way we also can drop nMaxEvents from the Windows backend. This limit was also never implemented on OSX and for the KDE4 backend it's actually impossible to handle single events, and a call to QAbstractEventDispatcher::processEvents works like this. Also changes various call sites to just process all pending events instead of some made up number of times. Change-Id: I1ab95df89b079cc8c6319a808194fe3127144d1c Reviewed-on: https://gerrit.libreoffice.org/42659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'include/vcl/scheduler.hxx')
-rw-r--r--include/vcl/scheduler.hxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 5c9d8f0d0d6e..2d422c6e9678 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -53,7 +53,16 @@ public:
static void CallbackTaskScheduling();
/// Process one pending task ahead of time with highest priority.
static bool ProcessTaskScheduling();
- /// Process all events until we are idle
+ /**
+ * Process all events until none is pending
+ *
+ * This can busy-lock, if some task or system event always generates new
+ * events when being processed. Most time it's called in unit tests to
+ * process all pending events. Internally it just calls
+ * Application::Reschedule( true ) until it fails.
+ *
+ * @see Application::Reschedule
+ */
static void ProcessEventsToIdle();
/**
* Process events until the parameter turns true,