Thread: send a signal

  1. #1
    Registered User
    Join Date
    May 2006

    send a signal


    Im working on a program that I should tell to stop and wait until something happens in another thread. What would be the best/right way to do this?

    Thank you

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    You can use an event object. It is created with CreateEvent. A thread waits on it using WaitForSingleObject. When it is time for that thread to be woken, the other thread can call SetEvent. Synchronisation can be tricky, read this blog post for discussion of some of the issues.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Child process can't send signal to itself.
    By arunj in forum C Programming
    Replies: 2
    Last Post: 03-23-2008, 11:19 AM
  2. Signal and exception handling
    By nts in forum C++ Programming
    Replies: 23
    Last Post: 11-15-2007, 02:36 PM
  3. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  4. LISP (DrScheme) any one?
    By Jeremy G in forum A Brief History of
    Replies: 5
    Last Post: 03-31-2004, 12:52 PM
  5. signal handling
    By trekker in forum C Programming
    Replies: 2
    Last Post: 07-05-2002, 02:52 AM