diff --git a/threadpool_pthread.c b/threadpool_pthread.c index ac57ef4..c7ef3ed 100644 --- a/threadpool_pthread.c +++ b/threadpool_pthread.c @@ -159,7 +159,7 @@ static void *threadpool_do_work(void *arg) { pthread_cond_signal(&threadpool->lazy_cond); pthread_mutex_unlock(&threadpool->queue_mutex); - pthread_exit(NULL); + return NULL; } static bool threadpool_create_thread_on_demand(threadpool_s *threadpool) {