[libcamera-devel] [PATCH 1/3] base: thread: Document the postMessage() function as thread-safe

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Jul 2 01:07:39 CEST 2021


The Thread::postMessage() function is thread-safe, document it as such.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 src/libcamera/base/thread.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libcamera/base/thread.cpp b/src/libcamera/base/thread.cpp
index c7c2d6b29d6a..7f79115222e8 100644
--- a/src/libcamera/base/thread.cpp
+++ b/src/libcamera/base/thread.cpp
@@ -526,6 +526,8 @@ EventDispatcher *Thread::eventDispatcher()
  *
  * If the \a receiver is not bound to this thread the behaviour is undefined.
  *
+ * \context This function is \threadsafe.
+ *
  * \sa exec()
  */
 void Thread::postMessage(std::unique_ptr<Message> msg, Object *receiver)
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list