Broadcast completion before unlocking condition variable's mutex (#12822)
vkalintiris committed
May 4, 2022 at 21:59 UTC
9d2b68fae5d6945db0e7b51f3db76bd330407492
1 file changed
+1
-1
libnetdata/completion/completion.c
+1
-1
@@ -29,6 +29,6 @@ void completion_mark_complete(struct completion *p)
29
{
30
uv_mutex_lock(&p->mutex);
31
p->completed = 1;
32
- uv_mutex_unlock(&p->mutex);
32
uv_cond_broadcast(&p->cond);
33
+ uv_mutex_unlock(&p->mutex);
34
}