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-15 00:53:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) Newsgroups: comp.lang.ada Subject: Re: How to avoid unreferenced objects (mutexes etc) Date: Tue, 15 Jan 2002 08:53:21 GMT Message-ID: <3c43e7ad.87256437@News.CIS.DFN.DE> References: <3c3ee8c8.105408250@News.CIS.DFN.DE> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) X-Trace: fu-berlin.de 1011084801 31224262 212.79.194.111 (16 [77047]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:18927 Date: 2002-01-15T08:53:21+00:00 List-Id: On Mon, 14 Jan 2002 18:32:35 -0500, "Matthew Heaney" wrote: >Yes, a semaphore all by itself is dangerous, because you can forget to >release it. But when used in conjuction with a controlled object, the >release is guaranteed to happen, so there is no danger. IMO, when it is said that semaphore is a low-level mechanism, it means approximately the following. Tasks and protected objects may have entries implementing *something* [useful (:-))]. In contrary to this, semaphores just implement themselves. A semaphore is useless without the resource it blocks. But then why is it separated from the resource? Regards, Dmitry Kazakov