如何在不使用线程时让它挂起
我现在的代码
DWORD WINAPI FunProc( LPVOID lpParameter // thread data){ hMutex=CreateMutex(NULL,FALSE,"命名"); //线程执行内容 CloseHandle(hMutex);}void xx(){ HANDLE hThread[500]; while(1){ for(i=0;i<线程总数;i++){ //i是线程数 hThread=CreateThread(NULL,0,FunProc,NULL,0,NULL); } WaitForMultipleObjects(i,hThread,TRUE,500); }}