From c0a58b97989f7d529f1469b2c2f8705ff55d3af4 Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Tue, 25 Feb 2025 16:06:12 +0100 Subject: utils: ipc: Only dispatch messages for proxy when stopping thread 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 Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/codegen/ipc/generators/libcamera_templates') 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 -%} -- cgit v1.2.1