@samitouri / QOSamiQemu / commits / e79175c737

ui/vnc-jobs: remove vnc_queue_clear()

The function was never called, since the worker thread was never exiting. Also it was incomplete (not clearing pending job list) and mixing global queue and argument. Let's remove it. Note: maybe the worker thread could be torn down when vnc_jobs_join() realizes there is no job left. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Marc-André Lureau committed Mar 13, 2026 at 23:33 UTC e79175c73770c3b763f5857ebfb642c7ce3292ca
1 file changed +1 -9
ui/vnc-jobs.c
+1 -9
@@ -345,14 +345,6 @@ static VncJobQueue *vnc_queue_init(void)
345 return queue;
346 }
347
348 -static void vnc_queue_clear(VncJobQueue *q)
349 -{
350 - qemu_cond_destroy(&queue->cond);
351 - qemu_mutex_destroy(&queue->mutex);
352 - g_free(q);
353 - queue = NULL; /* Unset global queue */
354 -}
355 -
348 static void *vnc_worker_thread(void *arg)
349 {
350 VncJobQueue *queue = arg;
@@ -360,7 +352,7 @@ static void *vnc_worker_thread(void *arg)
352 qemu_thread_get_self(&queue->thread);
353
354 while (!vnc_worker_thread_loop(queue)) ;
363 - vnc_queue_clear(queue);
355 + g_assert_not_reached();
356 return NULL;
357 }
358