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

G

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
}
...
}
 
V

Victor Bazarov

zoom said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top