I have a thread which is blocked on 'WaitCommEvent' . The port has been openned in non-overlapped mode. How do I terminate this thread?
Thanks,
Ivan.
This is a discussion on Terminating blocked thread (MS VC++) within the C++ Programming forums, part of the General Programming Boards category; I have a thread which is blocked on 'WaitCommEvent' . The port has been openned in non-overlapped mode. How do ...
I have a thread which is blocked on 'WaitCommEvent' . The port has been openned in non-overlapped mode. How do I terminate this thread?
Thanks,
Ivan.
The only way to do it cleanly is to use overlapped i/o so that you can wait on multiple handles. Then if you need to exit the thread before the overlapped i/o completes, you can call CancelIo().
gg