From d5d7b71521cb9ad72505d66346227688134b8576 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 12 Aug 2019 02:44:32 +0300 Subject: libcamera: object: Add an asynchronous method invocation method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a helper invokeMethod() to the Object class that allows asynchrnous invocation of any method of an Object instance. Asynchronous invocation occurs when control returns to the event dispatcher of the target object's thread, in the context of that thread. To support this, generalise the SignalMessage implementation to support automatic deletion of the associated BoundMethod, and rename the message to InvokeMessage to reflect the more generic purpose. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/bound_method.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcamera/bound_method.cpp') diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/bound_method.cpp index 23b8f412..d89f84c0 100644 --- a/src/libcamera/bound_method.cpp +++ b/src/libcamera/bound_method.cpp @@ -19,7 +19,7 @@ void BoundMethodBase::activatePack(void *pack) invokePack(pack); } else { std::unique_ptr msg = - utils::make_unique(this, pack); + utils::make_unique(this, pack); object_->postMessage(std::move(msg)); } } -- cgit v1.2.1