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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: How to simulate semaphores with Ada's tasks? Date: Wed, 24 Aug 2016 18:04:46 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <35ae841e-5947-44e9-a8d4-479cf40c4277@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 25 Aug 2016 01:04:49 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d7c030f56102b58a2c16dea977db88bb"; logging-data="6045"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+r/EXGUtrzNjU4toNVUnW3DJejBUkcHHs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: <35ae841e-5947-44e9-a8d4-479cf40c4277@googlegroups.com> Cancel-Lock: sha1:ic7zK+xQxxGaONaXLGvSW9lb1FE= Xref: news.eternal-september.org comp.lang.ada:31559 Date: 2016-08-24T18:04:46-07:00 List-Id: On 08/24/2016 05:41 PM, Andrew Shvets wrote: > > If so, then the best possible way to simulate this is to have tasks send > messages to one another and synchronize when something is locked/unlocked. > Is there a better approach? Yes, you use protected objects. -- Jeff Carter "He had no conception of the instrument. He was blowing into it." Take the Money and Run 135