mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-26 07:05:40 +00:00
Join CdStream threads to wait for them to exit
This commit is contained in:
parent
07d1637342
commit
28fb26f792
1 changed files with 2 additions and 0 deletions
|
@ -216,10 +216,12 @@ CdStreamShutdown(void)
|
||||||
#ifndef ONE_THREAD_PER_CHANNEL
|
#ifndef ONE_THREAD_PER_CHANNEL
|
||||||
gCdStreamThreadStatus = 2;
|
gCdStreamThreadStatus = 2;
|
||||||
sem_post(gCdStreamSema);
|
sem_post(gCdStreamSema);
|
||||||
|
pthread_join(_gCdStreamThread, nil);
|
||||||
#else
|
#else
|
||||||
for ( int32 i = 0; i < gNumChannels; i++ ) {
|
for ( int32 i = 0; i < gNumChannels; i++ ) {
|
||||||
gpReadInfo[i].nThreadStatus = 2;
|
gpReadInfo[i].nThreadStatus = 2;
|
||||||
sem_post(gpReadInfo[i].pStartSemaphore);
|
sem_post(gpReadInfo[i].pStartSemaphore);
|
||||||
|
pthread_join(gpReadInfo[i].pChannelThread, nil);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue