From b11ce3280f5b4d696ca8f3f267efb458af943433 Mon Sep 17 00:00:00 2001 From: Jim King Date: Wed, 29 Mar 2023 13:58:52 +0000 Subject: [PATCH] i/issue-1006: fix cv signal outside of lock --- source/thread_shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/thread_shared.c b/source/thread_shared.c index a0d19adfe..cbceb428e 100644 --- a/source/thread_shared.c +++ b/source/thread_shared.c @@ -40,8 +40,8 @@ void aws_thread_increment_unjoined_count(void) { void aws_thread_decrement_unjoined_count(void) { aws_mutex_lock(&s_managed_thread_lock); --s_unjoined_thread_count; - aws_mutex_unlock(&s_managed_thread_lock); aws_condition_variable_notify_one(&s_managed_thread_signal); + aws_mutex_unlock(&s_managed_thread_lock); } size_t aws_thread_get_managed_thread_count(void) {