From 5a954cb8b57ec1869958985f6557c38bb5503e5a Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 12 Aug 2019 00:06:48 +0300 Subject: libcamera: object: Notify objects of thread move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Send a synchronous message to objects just before they get moved to a new thread. This allows the object to perform any required processing. EventNotifier and Timer objects will use this mechanism to move themselves to the new thread's event disaptcher. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/message.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libcamera/message.cpp') diff --git a/src/libcamera/message.cpp b/src/libcamera/message.cpp index f6c39d40..efafb655 100644 --- a/src/libcamera/message.cpp +++ b/src/libcamera/message.cpp @@ -47,6 +47,8 @@ std::atomic_uint Message::nextUserType_{ Message::UserMessage }; * \brief Invalid message type * \var Message::InvokeMessage * \brief Asynchronous method invocation across threads + * \var Message::ThreadMoveMessage + * \brief Object is being moved to a different thread * \var Message::UserMessage * \brief First value available for user-defined messages */ -- cgit v1.2.1