프로그래밍/C++

UNIX pthread 이용시 쓰레드 Timeout 거는 방법

jonelove71 2009. 9. 1. 22:46

#include "PThread_TimeOut.h"

...

status = pthread_create(&hThread,
                               NULL,
          &CTCPComm::ValidateData_Server,
                               &pthread_args);
                               
pthread_join_timeout(hThread, 2000) ;

pthread_detach(hThread);
...