39 : m_hSemaphore( NULL )
43 m_hSemaphore = CreateSemaphore( NULL, nInit, nMax, NULL );
44 if( NULL == m_hSemaphore )
47 throw std::bad_alloc();
50 sem_init( &m_Semaphore,
false, (
unsigned int)nInit );
68 CloseHandle( m_hSemaphore );
77 WaitForSingleObject( m_hSemaphore, INFINITE );
86 ReleaseSemaphore( m_hSemaphore, 1, NULL );
#define LOG_FREE_TEXT(txt)
Semaphore(int nInit=0, int nMax=1)
Semaphore & operator=(const Semaphore &)