From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,f92fbb4a0420dd57 X-Google-Attributes: gid109fba,public From: mikey@mcs.com (Mike Young) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/03/31 Message-ID: <4jkkt6$fdb@Nntp1.mcs.net>#1/1 X-Deja-AN: 145065982 references: <4je9ju$174r@watnews1.watson.ibm.com> <4jhe1v$m0g@dayuc.dayton.saic.com> <315CDCF9.31AF@mcs.com> <315D902C.6F7B@escmail.orl.mmc.com> content-type: Text/Plain; charset=US-ASCII organization: Fen Software, Inc. mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c++ Date: 1996-03-31T00:00:00+00:00 List-Id: In article <315D902C.6F7B@escmail.orl.mmc.com>, dennison@escmail.orl.mmc.com says... > >Mike Young wrote: >> >> Hmmmm. Lacking a language based synch method doesn't mean we always go >> straight to the semaphore library. I commonly use thin wrappers to guard >> precious resources -- for example: mutexes, semaphores, files, >> or database sessions. Local scoping allows precise control of lifetimes, >> and ensure release even when exceptions are possible: > >OK. Now what do you do if you have to port that code to DOS? :-) =========== I believe it would then be time to consider relocation. The code itself, however, requires only minor modifications: return successful immediately. The concept -- resource guarding in a local scope -- still applies. :) Mike.