kopia lustrzana https://github.com/ha7ilm/csdr
Now calling pthread_detach for each thread
rodzic
17b8c7b3c0
commit
6ef2a74206
6
nmux.cpp
6
nmux.cpp
|
@ -201,6 +201,12 @@ int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
if(clients[i]->status == CS_THREAD_FINISHED)
|
if(clients[i]->status == CS_THREAD_FINISHED)
|
||||||
{
|
{
|
||||||
|
if(pthread_detach(clients[i]->thread)!=0)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"nmux pthread_detach failed for client %d\n", i);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(NMUX_DEBUG) fprintf(stderr, "mainfor: client removed: %d\n", i);
|
if(NMUX_DEBUG) fprintf(stderr, "mainfor: client removed: %d\n", i);
|
||||||
//client destructor
|
//client destructor
|
||||||
pool->remove_thread(clients[i]->tsmthread);
|
pool->remove_thread(clients[i]->tsmthread);
|
||||||
|
|
Ładowanie…
Reference in New Issue