diff options
author | erorcun <erayorcunus@gmail.com> | 2020-10-24 17:27:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-24 17:27:47 +0300 |
commit | 4d0f702df03323f7393e2891404cba1f51c57e67 (patch) | |
tree | 0833507ef5dc4c209f937d042fd2efa0c191deb2 | |
parent | a492f8ba0d7bf4a740ed91ccd7820a3afd9a111b (diff) | |
parent | a32c390a954287e5918e5ea6297f6df7b75c1752 (diff) |
Merge pull request #781 from AGraber/bugfix/cdstream_threads
Join CdStream threads to wait for them to exit
-rw-r--r-- | src/core/CdStreamPosix.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp index fdc63a05..5c8d1b16 100644 --- a/src/core/CdStreamPosix.cpp +++ b/src/core/CdStreamPosix.cpp @@ -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 } |