fixed some race conditions

This commit is contained in:
nova
2025-07-07 19:11:48 +02:00
parent bc2989b2d9
commit b2b100727f
2 changed files with 37 additions and 28 deletions

5
main.c
View File

@ -73,6 +73,11 @@ int main(){
pthread_cancel(thread_m);
pthread_cancel(thread_r);
pthread_cancel(thread_b);
pthread_join(thread_b, NULL);
pthread_join(thread_r, NULL);
pthread_join(thread_m, NULL);
pthread_join(thread_l, NULL);
pthread_join(thread_t, NULL);
threading = 0;
}
pthread_create(&thread_t, NULL, thread_top, win_t); /*top bar*/