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 <mzamazal@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Milan Zamazal 2025-02-25 16:06:12 +01:00 committed by Kieran Bingham
parent 86ffaf936d
commit c0a58b9798

View file

@ -34,7 +34,7 @@
thread_.exit(); thread_.exit();
thread_.wait(); thread_.wait();
Thread::current()->dispatchMessages(Message::Type::InvokeMessage); Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this);
state_ = ProxyStopped; state_ = ProxyStopped;
{%- endmacro -%} {%- endmacro -%}