From 33be898130f075bcd2e4a1cdb61ea54a8540932a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 20 Jul 2023 15:29:30 +0200 Subject: [PATCH] thread-loop: signal when started This makes it possible to wait for the thread to have started. --- src/pipewire/thread-loop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pipewire/thread-loop.c b/src/pipewire/thread-loop.c index 8d760ed09..65de2a0b8 100644 --- a/src/pipewire/thread-loop.c +++ b/src/pipewire/thread-loop.c @@ -282,6 +282,8 @@ static void *do_loop(void *user_data) pw_log_debug("%p: enter thread", this); pw_loop_enter(this->loop); + pw_thread_loop_signal(this, false); + while (this->running) { if ((res = pw_loop_iterate(this->loop, -1)) < 0) { if (res == -EINTR)