🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6298

Re: threads memory access

#6298
From: Jonathan Benedicto
Date: Tue, 24 May 2005 16:30
21 lines
1726 bytes
"Dennis Jones" <nospam@nospam.com> wrote in message 
news:429354a6@newsgroups.borland.com...
>
> A critical section is the most efficient (in terms of performance) 
> kernel
> mode synchronization primitive.  If you are looking for performance, 
> a
> critical section is the way to go.  Though it might seem slower 
> than, say, a
> boolean lock, it is safe, while a boolean lock is not.
>
> On the other hand, depending on what the other threads are doing, it 
> might
> be faster to lock the whole vector, do your search, and then unlock 
> (as
> opposed to locking each element individually).

Thank you for this input. I'm going to try a critical section, and see 
how it works out.

Jonathan 
Technical Details
Message-ID: <429356ac$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <428e4b3f$1@newsgroups.borland.com> <4291c5b1$1@newsgroups.borland.com> <4291ed05$1@newsgroups.borland.com> <429354a6@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> <4291ed05$1@newsgroups.borland.com> <429354a6@newsgroups.borland.com>
Subject: Re: threads memory access
Date: Tue, 24 May 2005 12:30:38 -0400
Lines: 23
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; Original
NNTP-Posting-Host: 69.158.105.106
Message-ID: <429356ac$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1116952236 69.158.105.106 (24 May 2005 09:30:36 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail