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:1d46:: with SMTP id 67-v6mr457213itj.36.1524817939831; Fri, 27 Apr 2018 01:32:19 -0700 (PDT) X-Received: by 2002:a9d:73c9:: with SMTP id m9-v6mr85555otk.9.1524817939745; Fri, 27 Apr 2018 01:32:19 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!paganini.bofh.team!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!k65-v6no217623ita.0!news-out.google.com!b185-v6ni271itb.0!nntp.google.com!k65-v6no217619ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 27 Apr 2018 01:32:19 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83d7:a570:2da5:ce36:2f82:22b9; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83d7:a570:2da5:ce36:2f82:22b9 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Finalization of library level tasks From: AdaMagica Injection-Date: Fri, 27 Apr 2018 08:32:19 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2217 X-Received-Body-CRC: 1041287606 Xref: reader02.eternal-september.org comp.lang.ada:51744 Date: 2018-04-27T01:32:19-07:00 List-Id: Am Freitag, 27. April 2018 09:37:46 UTC+2 schrieb Dmitry A. Kazakov: > You *can* finalize the class of the object containing the task with the > task component still running: > > type Container_Type is .. tagged ... > T : Task_Type; > > The order of finalization must be: > > Finalize Container_Type'Class; > Stop T; -- Existing order IIUC, you mean the task T is stopped anywhere in the middle of its work? Ada calls this abort. This means a lot of things may be left in an invalid state. Normal task completion takes place at defined places, everything is left in a well-defined state. It's your design work to define those places. > Finalize Container_Type; > Finalize T; > > Note that Ada 95 type system wisely distinguished Container_Type'Class