Wait for "signal" from another application and/or thread

Discussion in 'C++' started by Guest, Jul 26, 2004.

  1. Guest

    Guest Guest

    Assume that we have two applications running on the same PC each with two
    threads.


    Application-1, Thread-1 :
    . . .
    while(!Terminated && !MYSIGNAL) {
    //?? How to implement following line ??
    wait for MYSIGNAL
    ...
    }

    Application-1, Thread-2 :
    . . .
    while(!Terminated ) {
    if (Some Condition) {
    //?? How to implement following line ??
    raise MYSIGNAL
    }
    ...
    }



    Application-1, Thread-1 :
    . . .
    while(!Terminated && !MYSIGNAL) {
    //?? How to implement following line ??
    wait for MYSIGNAL for 200millisecond
    if (MYSIGNAL)
    Do this..
    else
    Do that..
    ...
    }

    Application-2, Thread-2 :
    . . .
    while(!Terminated ) {
    if (Some Condition) {
    //?? How to implement following line ??
    raise MYSIGNAL
    }
    ...
    }
     
    Guest, Jul 26, 2004
    #1
    1. Advertising

  2. zoom wrote:
    > Assume that we have two applications running on the same PC each with two
    > threads.
    > [..]


    Off-topic. Please ask in comp.programming.threads or in a newsgroup
    for your OS/platform.

    V
     
    Victor Bazarov, Jul 26, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Peters

    wait for signal change

    Andy Peters, May 17, 2005, in forum: VHDL
    Replies:
    3
    Views:
    4,036
    Klaus Falser
    May 18, 2005
  2. Replies:
    2
    Views:
    1,487
    micky
    Aug 29, 2005
  3. Huey

    How to make "fork/wait" to WAIT longer?

    Huey, Mar 1, 2004, in forum: C Programming
    Replies:
    1
    Views:
    1,971
    -berlin.de
    Mar 1, 2004
  4. Jack Orenstein

    threading.Thread vs. signal.signal

    Jack Orenstein, Sep 18, 2005, in forum: Python
    Replies:
    0
    Views:
    472
    Jack Orenstein
    Sep 18, 2005
  5. Xin Xiao

    wait for signal in process

    Xin Xiao, Dec 31, 2007, in forum: VHDL
    Replies:
    1
    Views:
    612
Loading...

Share This Page