Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Wait for "signal" from another application and/or thread

Reply
Thread Tools

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

 
 
Guest
Posts: n/a
 
      07-26-2004
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
}
...
}


 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      07-26-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem mutex-thread "Unlocking mutex owned by another thread ???" NaeiKinDus C++ 3 04-15-2007 09:35 PM
problem mutex-thread "Unlocking mutex owned by another thread ???" NaeiKinDus C++ 1 04-14-2007 07:40 PM
How to avoid a thread stealing the turn of another thread? Nafai Java 2 04-24-2005 03:49 PM
How to make "fork/wait" to WAIT longer? Huey C Programming 1 03-01-2004 02:01 PM
Passing result from one thread to another thread at the end of execution sayoyo Java 3 02-16-2004 03:39 PM



Advertisments