void CTranscendenceWnd::DestroyBackgroundThread (void) // DestroyBackgroundThread // // Destroy the background thread { SetBackgroundState(bsQuit); SDL_WaitThread(m_hBackgroundThread, NULL); SDL_DestroySemaphore(m_hWorkAvailableEvent); }
void CTranscendenceWnd::DestroyBackgroundThread (void) // DestroyBackgroundThread // // Destroy the background thread { SetBackgroundState(bsQuit); ::WaitForSingleObject(m_hBackgroundThread, 5000); ::CloseHandle(m_hWorkAvailableEvent); ::CloseHandle(m_hBackgroundThread); }