Duint __stdcall RenderThread::HandleRunner(Dvoid* parameter) { RenderThread* thread = (RenderThread*)parameter; Dbool isShutDown = false; while( !isShutDown ) { DWORD dwWaitResult = WaitForMultipleObjects(2, thread->m_arrHandleWorkEvent.data(), FALSE, INFINITE); if( dwWaitResult == WAIT_OBJECT_0 ) thread->Run(); else if( dwWaitResult == (WAIT_OBJECT_0 + 1) ) isShutDown = true; } return 0; }