[PATCH v3 6/6] utils: ipc: Only dispatch messages for proxy when stopping thread
Kieran Bingham
kieran.bingham at ideasonboard.com
Sat Mar 1 23:58:12 CET 2025
Quoting Milan Zamazal (2025-02-25 15:06:12)
> 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: Kieran Bingham <kieran.bingham 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 -%}
> --
> 2.48.1
>
More information about the libcamera-devel
mailing list