Wait for "signal" from another application and/or thread
zoom
Date: 09/12/04
- Next message: Mike Cox: "Linux runs on Toasters, XBoxes, cellphones..."
- Previous message: Paul Pluzhnikov: "Re: Wrapping C++ with C"
- Next in thread: William Ahern: "Re: Wait for "signal" from another application and/or thread"
- Reply: William Ahern: "Re: Wait for "signal" from another application and/or thread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 13 Sep 2004 02:43:00 +1000
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-2, 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
}
...
}
- Next message: Mike Cox: "Linux runs on Toasters, XBoxes, cellphones..."
- Previous message: Paul Pluzhnikov: "Re: Wrapping C++ with C"
- Next in thread: William Ahern: "Re: Wait for "signal" from another application and/or thread"
- Reply: William Ahern: "Re: Wait for "signal" from another application and/or thread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]