1
0
mirror of https://gitlab.com/klmp200/LO41.git synced 2025-07-10 11:49:24 +00:00

Pthread KILL

This commit is contained in:
2018-06-15 19:14:30 +02:00
parent 415ef4807c
commit 3126e57610
7 changed files with 37 additions and 6 deletions

View File

@ -81,8 +81,10 @@ int use_call_box_SharedData(THIS(SharedData), char * resident_name){
void _free__SharedData(THIS(SharedData)){
int i;
if (this->threads != NULL){
for (i=0; i<this->threads_nb; i++)
pthread_cancel(this->threads[i]);
for (i=0; i<this->threads_nb; i++) {
printf("Quitting thread %d\n", (int) this->threads[i]);
pthread_kill(this->threads[i], SIGUSR1);
}
free(this->threads);
}
if (this->main_building != NULL)