Article View: borland.public.cppbuilder.nativeapi
Article #6287Re: threads memory access
From: Jonathan Benedicto
Date: Mon, 23 May 2005 14:47
Date: Mon, 23 May 2005 14:47
15 lines
1735 bytes
1735 bytes
"Oliver Rutsch" <orutsch@sympatec.com> wrote in message news:4291c5b1$1@newsgroups.borland.com... > > I would never use boolean locks "by hand". Use instead a critical > section for your structure. When we come to hyper threading and > dual/multi core systems even a bool-write is not an atomic operation > anymore. And what do you do if one thread finds the structure > locked? It polls the bool and consumes time. A critical section > manages this all for you. Thank you for this input. I could use critical sections, but I thought that the bool would be enough. I really need as little delay as possible when trying to find the unlocked buffer. Jonathan
Technical Details
Message-ID:
<4291ed05$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!gail.ripco.com!tdsnet-transit!newspeer.tds.net!news-out.news.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<428e4b3f$1@newsgroups.borland.com> <4291c5b1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f662da50ec5f6f69 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Jonathan Benedicto" <incorrect@no.server> Newsgroups: borland.public.cppbuilder.nativeapi References: <428e4b3f$1@newsgroups.borland.com> <4291c5b1$1@newsgroups.borland.com> Subject: Re: threads memory access Date: Mon, 23 May 2005 10:47:43 -0400 Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 69.158.105.106 Message-ID: <4291ed05$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1116859653 69.158.105.106 (23 May 2005 07:47:33 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!gail.ripco.com!tdsnet-transit!newspeer.tds.net!news-out.news.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail