🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ensuring CriticalSections are release..

#792
From: Mike Collins
Date: Sun, 13 Jan 2008 23:04
11 lines
1366 bytes
Hay all, just a quicky, just wondering if anyone had any thoughts on using 
try... __finally to ensure that a critical section is always released?

I have a thread with a getter and setter to provide access to a private 
variable.  I use a CRITICAL_SECTION to ensure thead-safety but i wasn't sure 
about whether or not to use a try.. __finally to ensure that the CS always 
gets released...

Many thanks in advance,

Mike Collins 
Technical Details
Message-ID: <478a96e3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,266d339b0fd4ba38,start
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Mike Collins" <its@TheBottomOfThePost>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: ensuring CriticalSections are release..
Date: Sun, 13 Jan 2008 23:04:39 -0000
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.3959
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 82.1.160.148
Message-ID: <478a96e3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1200264931 82.1.160.148 (13 Jan 2008 14:55:31 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail