ui/common/threadpool.c

changeset 955
ea9a999b4fc8
parent 950
39641cf150eb
--- a/ui/common/threadpool.c	Sun Dec 07 10:41:04 2025 +0100
+++ b/ui/common/threadpool.c	Sun Dec 07 10:51:47 2025 +0100
@@ -156,7 +156,12 @@
 }
 
 void ui_queue_free(UiQueue *queue) {
-    // TODO
+    // The queue must be empty, we could free UiQueueElm,
+    // but not the payload data
+    pthread_mutex_destroy(&queue->lock);
+    pthread_mutex_destroy(&queue->avlbl_lock);
+    pthread_cond_destroy(&queue->available);
+    free(queue);
 }
 
 void ui_queue_put(UiQueue *queue, void *data) {

mercurial