send a signal

This is a discussion on send a signal within the Windows Programming forums, part of the Platform Specific Boards category; Hello.. Im working on a program that I should tell to stop and wait until something happens in another thread. ...

  1. #1
    l2u
    l2u is offline
    Registered User
    Join Date
    May 2006
    Posts
    630

    send a signal

    Hello..

    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
    Posts
    2,544
    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, 01:36 PM
  3. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 08:32 AM
  4. LISP (DrScheme) any one?
    By Jeremy G in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 03-31-2004, 11:52 AM
  5. signal handling
    By trekker in forum C Programming
    Replies: 2
    Last Post: 07-05-2002, 02:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21