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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,853d46c8ab5c7ada X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!q14g2000vbn.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: Protected Adjust? Date: Fri, 17 Apr 2009 11:21:03 -0700 (PDT) Organization: http://groups.google.com Message-ID: <23c538ef-fd55-4c64-b0b2-66aab982c64a@q14g2000vbn.googlegroups.com> References: NNTP-Posting-Host: 82.20.239.89 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1239992463 31259 127.0.0.1 (17 Apr 2009 18:21:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 17 Apr 2009 18:21:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q14g2000vbn.googlegroups.com; posting-host=82.20.239.89; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5490 Date: 2009-04-17T11:21:03-07:00 List-Id: On Apr 17, 8:52=A0am, Dimonax wrote: > How does one encapsulate a Controlled type inside a Protected type such > that Initialize, Finalize, and Ajust can be done concurrently? > package mutators is > =A0 =A0 =A0 =A0 Protected Type Mutual_Excluder is > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 -- This procedure is called by Initialize= -- > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 procedure Create(Item : in Item_Type); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 -- This procedure is called by Adjust. -- > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 procedure Update(Item : in out Item_Point= er); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 -- This procedure is called by Finalize -= - > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 procedure Destroy(Item : in out Item_Poin= ter); There are no instances of Mutual_Excluder so how do these procedures get called? > The goal of this excercise is to be able to use the Adjust procedure from > different tasks exclusively. Initialize, Adjust, Finalize are only relevant as part of the implementation of creation/assignment/copying/destruction. I don't see how you propose to use mutators.Mutable in practice, it's hard to comment further without some sort of use case.