summaryrefslogtreecommitdiff
path: root/src/libcamera/event_dispatcher.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-01-23 10:04:23 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-01-23 18:51:56 +0200
commit4d470eb37fe31cc9899ee36e81134b35b02a36f3 (patch)
tree552ed084bb00b42df90a7590db25e5bb8a2d4df8 /src/libcamera/event_dispatcher.cpp
parentd370c1b46e1733905fd76eec004be26475afae9d (diff)
libcamera: event_dispatcher: Add interrupt() function
The new interrupt() function allows interrupting in-progress blocking processEvents() calls. This is useful to stop running event loops. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/event_dispatcher.cpp')
-rw-r--r--src/libcamera/event_dispatcher.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/event_dispatcher.cpp
index f7c40734..b82c59c3 100644
--- a/src/libcamera/event_dispatcher.cpp
+++ b/src/libcamera/event_dispatcher.cpp
@@ -104,4 +104,14 @@ EventDispatcher::~EventDispatcher()
* it before returning.
*/
+/**
+ * \fn EventDispatcher::interrupt()
+ * \brief Interrupt any running processEvents() call as soon as possible
+ *
+ * Calling this function interrupts any blocking processEvents() call in
+ * progress. The processEvents() function will return as soon as possible,
+ * after processing pending timers and events. If processEvents() isn't in
+ * progress, it will be interrupted immediately the next time it gets called.
+ */
+
} /* namespace libcamera */