Thread: Terminating blocked thread (MS VC++)

  1. #1
    Registered User
    Join Date
    Aug 2003

    Terminating blocked thread (MS VC++)

    I have a thread which is blocked on 'WaitCommEvent' . The port has been openned in non-overlapped mode. How do I terminate this thread?



  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    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().


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to make a thread sleep or std::recv timeout?
    By BrianK in forum Linux Programming
    Replies: 3
    Last Post: 02-26-2003, 10:27 PM
  2. Multithreading
    By Cela in forum Windows Programming
    Replies: 13
    Last Post: 01-15-2003, 03:02 PM
  3. Your Best thread and your most stupid thread ??
    By jawwadalam in forum A Brief History of
    Replies: 13
    Last Post: 01-03-2003, 07:41 PM
  4. MFC Controls and Thread Safety :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 12-06-2002, 11:36 AM
  5. Multi-Thread Programming
    By drdroid in forum C++ Programming
    Replies: 6
    Last Post: 04-04-2002, 02:53 PM