st/nine: clean up thead shutdown sequence a bit

Just break out of the loop instead, it does the same thing.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
This commit is contained in:
Andre Heider 2018-11-06 09:27:14 +01:00 committed by Axel Davy
parent 123bf9cbe7
commit 414470854d

View file

@ -52,10 +52,8 @@ threadpool_worker(void *data)
while (!pool->workqueue && !pool->shutdown)
pthread_cond_wait(&pool->new_work, &pool->m);
if (pool->shutdown) {
pthread_mutex_unlock(&pool->m);
return NULL;
}
if (pool->shutdown)
break;
/* Pull the first task from the list. We don't free it -- it now lacks
* a reference other than the worker creator's, whose responsibility it