ALTIBASE Windows 매뉴얼....

AND


#ifdef WIN32
class Thread
{
public:
    Thread ( DWORD (WINAPI * pFun) (void* arg), void* pArg)
    {
        _handle = CreateThread (
            0, // Security attributes
            0, // Stack size
            pFun,
            pArg,
            CREATE_SUSPENDED,
            &_tid);
    }
    ~Thread () { CloseHandle (_handle); }
    void Resume () { ResumeThread (_handle); }
    void WaitForDeath (int nTimeOut)
    {
  if (nTimeOut==INFINITE) WaitForSingleObject (_handle,INFINITE);
        else WaitForSingleObject (_handle, nTimeOut*1000);
    }
 int nTimeOut;
private:
    HANDLE _handle;
    DWORD  _tid;     // thread id
 
};
#endif


사용방법

thread_func_args pthread_args(tcp_proc,socket_array[nConnection_Count-1]);

Thread thr(&CTCPComm::ValidateData_Client,&pthread_args);
thr.nTimeOut=3;
thr.Resume();
thr.WaitForDeath();

윈도우즈에서 Thread Hang이 사라짐..퍼포먼스 그런대로 괜찮음...

AND


실소스에 적용해보니 아주조금 퍼포먼스는 좋긴하나..그냥 그렇게 월등해보이진 않음...
참고용으로만 사용..

AND


This error is thrown if a user wants to log on a database but lacks the create session system privilege. In order to give someone this privilege, use:

grant create session to the_user;
AND

#include "PThread_TimeOut.h"

...

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

pthread_detach(hThread);
...

AND