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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.176.72 with SMTP id b8mr4804758itj.35.1510461215681; Sat, 11 Nov 2017 20:33:35 -0800 (PST) X-Received: by 10.157.52.218 with SMTP id t26mr581339otd.10.1510461215616; Sat, 11 Nov 2017 20:33:35 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!m191no961773itg.0!news-out.google.com!193ni34iti.0!nntp.google.com!l196no1529655itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 11 Nov 2017 20:33:35 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8303:2100:5985:2c17:9409:aa9c; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8303:2100:5985:2c17:9409:aa9c References: <4502cd60-b843-4ace-99da-d716fc455635@googlegroups.com> <14ca8f28-a689-4431-9122-81a1c504569c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1810768e-7846-43ca-9871-b2468a060c37@googlegroups.com> Subject: Re: Read-write mutex sometimes fails on deadlock From: Robert Eachus Injection-Date: Sun, 12 Nov 2017 04:33:35 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Body-CRC: 2847605264 X-Received-Bytes: 2130 Xref: feeder.eternal-september.org comp.lang.ada:48829 Date: 2017-11-11T20:33:35-08:00 List-Id: On Monday, November 6, 2017 at 1:31:07 PM UTC-5, Simon Wright wrote: > Robert Eachus writes: > > > entry Write (D: in Data) is > > begin > > The_Data := D; > > Some_Data := True; > > Print(D); > > delay 0.1; > > end Write; > > Is this not illegal? or at the very least wrong? Don't get wrapped around the axle by random names in partial examples. Print might be a (non-blocking) routine that eventually calls an I/O routine like Ada.Text_IO.Put. Having said that, the delay 0.1 is very naughty, but on most hardware it will be implemented as a counting loop. (Make it delay 0.0001 if that makes you happier. ;-) It is not illegal, and is only erroneous if it results in a scheduling action.