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) {