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.107.199.65 with SMTP id x62mr5478966iof.130.1507540716350; Mon, 09 Oct 2017 02:18:36 -0700 (PDT) X-Received: by 10.157.33.247 with SMTP id s110mr130941otb.16.1507540716320; Mon, 09 Oct 2017 02:18:36 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.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!k70no1041500itk.0!news-out.google.com!u132ni1557ita.0!nntp.google.com!l196no1035309itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 9 Oct 2017 02:18:35 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.167.239.40; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR NNTP-Posting-Host: 85.167.239.40 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Task safe containers? Help needed. From: reinert Injection-Date: Mon, 09 Oct 2017 09:18:36 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Body-CRC: 3550200472 X-Received-Bytes: 2775 Xref: news.eternal-september.org comp.lang.ada:48402 Date: 2017-10-09T02:18:35-07:00 List-Id: Thanks, will test out options... reinert On Sunday, October 8, 2017 at 6:05:04 PM UTC+2, Dmitry A. Kazakov wrote: > On 2017-10-08 17:10, reinert wrote: > > > About your first option: Putting the containers in a protected > > object makes the container functions "private" and not directly available > > outside the protected object. Right? > > Which is good, since they are unsafe. > > > But your other options also somehow complicates :-) > > Not at all. > > > A compromise seems to be necessary :-) > > There is no compromise, each method has its use. > > > Maybe the first option anyway > > facilitates cleanest code? > > No. The cleanest code would be per delegation. Ada has none. Then there > are issues with interface functions while most relevant synchronization > mechanisms considered mutating. The Rosen's trick is used to work that > around. A problem for monitor (#2.b) is to have an unconstrained result, > since task entries cannot return such. > > > There must be a reason for the invention of > > protected types. > > The reason was to add an OO view on synchronization as a complement to > the procedural view tasks offer. > > The implementation provided by protected objects was chosen to be most > efficient, powerful, safe, verifiable and universal. Which comes with > certain limitations. > > -- > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de