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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6009c73a58f787a0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-11 10:14:54 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!uunet!lax.uu.net!sac.uu.net!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: How to avoid unreferenced objects (mutexes etc) X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3C3F28C8.C27063D8@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: <3c3ee8c8.105408250@News.CIS.DFN.DE> Mime-Version: 1.0 Date: Fri, 11 Jan 2002 18:02:48 GMT X-Mailer: Mozilla 4.73 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: archiver1.google.com comp.lang.ada:18789 Date: 2002-01-11T18:02:48+00:00 List-Id: "Dmitry A. Kazakov" wrote: > > The idea is to write critical sections as follows: > > Temp : Lock (Mutex_of_a_resource'Access); > begin > ... -- Safe access to the resource > end; -- Mutex is released even if an exception propagates > > 2. Is there a better solution? Use a dedicated monitor to implement the critical sections. -- Jeffrey Carter