diff options
Diffstat (limited to 'src/libcamera')
-rw-r--r-- | src/libcamera/event_notifier.cpp | 3 | ||||
-rw-r--r-- | src/libcamera/object.cpp | 9 | ||||
-rw-r--r-- | src/libcamera/timer.cpp | 3 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp index 687969b0..4326b0b4 100644 --- a/src/libcamera/event_notifier.cpp +++ b/src/libcamera/event_notifier.cpp @@ -128,7 +128,8 @@ void EventNotifier::message(Message *msg) if (msg->type() == Message::ThreadMoveMessage) { if (enabled_) { setEnabled(false); - invokeMethod(&EventNotifier::setEnabled, true); + invokeMethod(&EventNotifier::setEnabled, + ConnectionTypeQueued, true); } } diff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp index 509b2eba..db2c6f68 100644 --- a/src/libcamera/object.cpp +++ b/src/libcamera/object.cpp @@ -139,14 +139,15 @@ void Object::message(Message *msg) } /** - * \fn void Object::invokeMethod(void (T::*func)(Args...), Args... args) + * \fn void Object::invokeMethod() * \brief Invoke a method asynchronously on an Object instance * \param[in] func The object method to invoke + * \param[in] type Connection type for method invocation * \param[in] args The method arguments * - * This method invokes the member method \a func when control returns to the - * event loop of the object's thread. The method is executed in the object's - * thread with arguments \a args. + * This method invokes the member method \a func with arguments \a args, based + * on the connection \a type. Depending on the type, the method will be called + * synchronously in the same thread or asynchronously in the object's thread. * * Arguments \a args passed by value or reference are copied, while pointers * are passed untouched. The caller shall ensure that any pointer argument diff --git a/src/libcamera/timer.cpp b/src/libcamera/timer.cpp index ddb20954..4c688832 100644 --- a/src/libcamera/timer.cpp +++ b/src/libcamera/timer.cpp @@ -170,7 +170,8 @@ void Timer::message(Message *msg) if (msg->type() == Message::ThreadMoveMessage) { if (isRunning()) { unregisterTimer(); - invokeMethod(&Timer::registerTimer); + invokeMethod(&Timer::registerTimer, + ConnectionTypeQueued); } } |