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.
Printable View
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