在程序终止期间,如何取消阻止先前通过调用 GetQueuedCompletionStatus()
被阻止的线程?
最佳答案
您可以使用 PostQueuedCompletionStatus
API 调用将终止消息发布到 IO 完成端口,或者使用 CloseHandle
简单地关闭 IOCP
句柄。
If a call to
GetQueuedCompletionStatus
fails because the completion port handle associated with it is closed while the call is outstanding, the function returnsFALSE
,*lpOverlapped
will beNULL
, andGetLastError
will returnERROR_ABANDONED_WAIT_0
.
关于c++ - 从 GetQueuedCompletionStatus 解除阻止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38559905/