From c29f1dbe116c88434e77721ca215b8d2082b247f Mon Sep 17 00:00:00 2001 From: moonlightsh <85744700@qq.com> Date: Fri, 16 Jul 2021 10:21:06 +0800 Subject: [PATCH] fix evthread_use_pthreads_with_flags dead lock when first return --- evthread_pthread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/evthread_pthread.c b/evthread_pthread.c index 0614a066..00018d4a 100644 --- a/evthread_pthread.c +++ b/evthread_pthread.c @@ -215,6 +215,7 @@ evthread_use_pthreads_with_flags(int flags) evthread_set_id_callback(evthread_posix_get_id); once_init = 1; + pthread_mutex_unlock(&once_init_lock); return 0; error: pthread_mutex_unlock(&once_init_lock);