On Thu, Apr 30, 2026 at 01:02:47AM +0400, Marc-André Lureau wrote:
> The VNC encoding worker thread was using a single global queue shared
> across all VNC displays, with no way to stop it. This made it impossible
> to properly clean up resources when a VncDisplay is freed.
> 
> Move the VncJobQueue from a file-scoped global to a per-VncDisplay
> member, so each display owns its worker thread and queue. Add
> vnc_stop_worker_thread() to perform an orderly shutdown: signal the
> thread to exit, join it, and destroy the queue. The thread is now
> created as QEMU_THREAD_JOINABLE instead of QEMU_THREAD_DETACHED.
> 
> Signed-off-by: Marc-André Lureau <[email protected]>
> ---
>  ui/vnc-jobs.h |  3 ++-
>  ui/vnc.h      |  2 ++
>  ui/vnc-jobs.c | 62 
> ++++++++++++++++++++++++++++++++++++++---------------------
>  ui/vnc.c      |  3 ++-
>  4 files changed, 46 insertions(+), 24 deletions(-)

Reviewed-by: Daniel P. Berrangé <[email protected]>


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|


Reply via email to