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>
This commit is contained in:
Laurent Pinchart
2019-01-23 10:04:23 +02:00
parent d370c1b46e
commit 4d470eb37f
4 changed files with 46 additions and 1 deletions
+10
View File
@@ -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 */