[PATCH v3 6/6] utils: ipc: Only dispatch messages for proxy when stopping thread
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Feb 26 01:40:02 CET 2025
Hi Milan,
Thank you for the patch.
On Tue, Feb 25, 2025 at 04:06:12PM +0100, Milan Zamazal wrote:
> When stopping the proxy thread, all messages of InvokeMessage type
> posted to the pipeline handler thread are dispatched, to ensure that all
> signals emitted from the proxy thread and queued for delivery to the
> proxy are delivered synchronously. This unnecessarily delivers queued
> signals for other objects in the pipeline handler thread, possibly
> delaying processing of higher priority events.
>
> Improve the implementation by limiting synchronous delivery to messages
> posted for the proxy.
>
> Signed-off-by: Milan Zamazal <mzamazal at redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> .../ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl
> index b5797b14..25476990 100644
> --- a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl
> +++ b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl
> @@ -34,7 +34,7 @@
> thread_.exit();
> thread_.wait();
>
> - Thread::current()->dispatchMessages(Message::Type::InvokeMessage);
> + Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this);
>
> state_ = ProxyStopped;
> {%- endmacro -%}
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list