Article View: borland.public.cppbuilder.internet.socket
Article #1517Re: Is this Indy code safe?
From: Dennis Jones
Date: Fri, 12 Jan 2007 20:13
Date: Fri, 12 Jan 2007 20:13
24 lines
1751 bytes
1751 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:45a7e43c$1@newsgroups.borland.com... > > "Dennis Jones" <nospam@nospam.com> wrote in message > news:45a7ca99$1@newsgroups.borland.com... > >> Is the following code (from Indy 9) safe > > Asside from a missing handler to ensure UnlockList() is always called > regardless of an exception being thrown, then yes, it is generally > safe. Ah, yes, thank you. I've added an RAII object to handle that for me. >> is it possible for the TCPServer->Threads 'Count' to >> change between the LockList() and UnlockList() calls? > > It is not possible. The list is locked and will not allow external > changes until it is unlocked. Thanks, I suspected that was the case, but wasn't certain. - Dennis
Technical Details
Message-ID:
<45a7ebc5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45a7ca99$1@newsgroups.borland.com> <45a7e43c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,3cb86166c3ef0c03 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Dennis Jones" <nospam@nospam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <45a7ca99$1@newsgroups.borland.com> <45a7e43c$1@newsgroups.borland.com> Subject: Re: Is this Indy code safe? Date: Fri, 12 Jan 2007 12:13:07 -0800 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 NNTP-Posting-Host: 71.245.109.58 Message-ID: <45a7ebc5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1168632773 71.245.109.58 (12 Jan 2007 12:12:53 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail