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 2002:a24:54:: with SMTP id 81-v6mr6323256ita.4.1525091262588; Mon, 30 Apr 2018 05:27:42 -0700 (PDT) X-Received: by 2002:a9d:830:: with SMTP id 45-v6mr959275oty.7.1525091262374; Mon, 30 Apr 2018 05:27:42 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!k65-v6no2182088ita.0!news-out.google.com!b185-v6ni3510itb.0!nntp.google.com!f63-v6no2182792itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 30 Apr 2018 05:27:42 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83d7:a56b:31ad:f4a8:cd9b:d05d; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83d7:a56b:31ad:f4a8:cd9b:d05d References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3b736ddf-0807-4781-a973-6164280faae7@googlegroups.com> Subject: Re: Finalization of library level tasks From: AdaMagica Injection-Date: Mon, 30 Apr 2018 12:27:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3347 X-Received-Body-CRC: 312833466 Xref: reader02.eternal-september.org comp.lang.ada:51830 Date: 2018-04-30T05:27:42-07:00 List-Id: Am Sonntag, 29. April 2018 21:36:37 UTC+2 schrieb Dmitry A. Kazakov: > On 2018-04-29 19:41, AdaMagica wrote: > > Am Samstag, 28. April 2018 10:35:34 UTC+2 schrieb Dmitry A. Kazakov: > >=20 > >> All these instances *must* be finalized: X of T1 <- T2 <- T3 must be > >> finalized in the order > >> > >> Finalize (T1'Class (X)); > >> Finalize (T2'Class (X)); > >> Finalize (T3'Class (X)); > > I don't have the slightest idea what should happen there. >=20 > Anything necessary to finalize the class-wide object. E.g. informing a=20 > task component to complete: What is this "anything"? I do not see a connection from class-wide type to = its task components. What is the connection of class-wide type to other com= ponents? What's the difference between task components and other (perhaps l= imited) components? What does class-wide finalize do to those other compone= nts? In short: If you look inside a class-wide object, you'll find inside an obj= ect of a specific type within this class (as Randy said in a previous post)= . What's the property of this specific object seen as a class-wide object t= hat's not a property of the specific object? (I have problems expressing what I want to say.I > type T1; > task type Worker_Type (Parent : not null access T1'Class) is > entry Shutdown; > end Worker_Type; > type T1 is new Ada.Finalization.Limited_Controlled with record > Worker : Worker_Type; > end record; >=20 > procedure Finalize (Object : in out T1'Class) is > begin > Object.Worker.Shutdown; > end Finalize; >=20 > Differently to type-specific Finalize in a class-wide Finalize it is OK= =20 > to make dispatching calls.