Skip to content
Snippets Groups Projects
Commit 54f2dab2 authored by Alexandru BRĂSLAŞU's avatar Alexandru BRĂSLAŞU
Browse files

Tema

parent 3d7e930c
No related branches found
No related tags found
No related merge requests found
Pipeline #44262 passed
......@@ -90,15 +90,10 @@ static void *thread_loop_function(void *arg)
while (1) {
t = dequeue_task(tp);
pthread_mutex_lock(&tp->mutexCoada);
int ok = tp->stop;
pthread_mutex_unlock(&tp->mutexCoada);
if (ok)
if (t == NULL)
break;
if (t != NULL) {
t->action(t->argument);
destroy_task(t);
}
t->action(t->argument);
destroy_task(t);
}
pthread_mutex_lock(&tp->mutexCoada);
++tp->threadsOut;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment