Article View: borland.public.cppbuilder.nativeapi
Article #9225Wait for "signal" from another application and/or thread
From: zoom
Date: Mon, 26 Jul 2004 19:54
Date: Mon, 26 Jul 2004 19:54
45 lines
1867 bytes
1867 bytes
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
}
...
}
Technical Details
Message-ID:
<4105617c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b6552239fe09c315,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: <zoom> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Wait for "signal" from another application and/or thread Date: Tue, 27 Jul 2004 05:54:26 +1000 Lines: 47 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 211.30.68.31 Message-ID: <4105617c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090871676 211.30.68.31 (26 Jul 2004 12:54:36 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail