1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 04:40:00 +00:00

Merge pull request #781 from AGraber/bugfix/cdstream_threads

Join CdStream threads to wait for them to exit
This commit is contained in:
erorcun 2020-10-24 17:27:47 +03:00 committed by GitHub
commit 4d0f702df0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,10 +216,12 @@ CdStreamShutdown(void)
#ifndef ONE_THREAD_PER_CHANNEL
gCdStreamThreadStatus = 2;
sem_post(gCdStreamSema);
pthread_join(_gCdStreamThread, nil);
#else
for ( int32 i = 0; i < gNumChannels; i++ ) {
gpReadInfo[i].nThreadStatus = 2;
sem_post(gpReadInfo[i].pStartSemaphore);
pthread_join(gpReadInfo[i].pChannelThread, nil);
}
#endif
}