Article View: borland.public.cppbuilder.nativeapi
Article #7576Re: Accessing same variable from multiple threads
From: Remy Lebeau (TeamB)
Date: Thu, 20 Jan 2005 17:55
Date: Thu, 20 Jan 2005 17:55
15 lines
1546 bytes
1546 bytes
"Tumurbaatar S." <nospam_tumur@magicnet.mn> wrote in message news:41ef3506@newsgroups.borland.com... > Yes, I use synch methods when an exact value of shared var > is needed. But my question was about checking for zero or > not zero only. You still need to synchronize regardless of what you are using the shared var for. The code example I gave you does exactly what you are asking for - checks for zero/nonzero - while still providing proper synchronizing for all threads. Gambit
Technical Details
Message-ID:
<41eff001$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41edea6b@newsgroups.borland.com> <41ee9aae$1@newsgroups.borland.com> <41ef3506@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4809cdd9a7828fa7 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <41edea6b@newsgroups.borland.com> <41ee9aae$1@newsgroups.borland.com> <41ef3506@newsgroups.borland.com> Subject: Re: Accessing same variable from multiple threads Date: Thu, 20 Jan 2005 09:55:30 -0800 Lines: 17 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: 68.69.17.41 Message-ID: <41eff001$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1106243585 68.69.17.41 (20 Jan 2005 09:53:05 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail