HANDLE hThread; //线程句柄 DWORD NumberOfByte; //辅助返回值 WaitForSingleObject(hThread, INFINITE); //等待线程结束 ..
基于24个网页-相关网页
这么做是为了处理线程池中的死锁,当太多线程等待其他任务结束时就会出现死锁。
This was done to address deadlocks in the thread-pool. These deadlocks were caused when too many threads were waiting on other tasks.
我们的主线程一直等待输入任务单元结束时产生的事件信号。
Our main thread waits on an event that is signaled when input is dying.
而获取事件的线程并不等待处理线程的结束。
The thread responsible for fetching the event does not wait for the end of the processing thread.
应用推荐