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.65.10 with SMTP id x10mr7843028ita.35.1512388726648; Mon, 04 Dec 2017 03:58:46 -0800 (PST) X-Received: by 10.157.39.197 with SMTP id c63mr651402otb.11.1512388726543; Mon, 04 Dec 2017 03:58:46 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.kjsl.com!usenet.stanford.edu!i6no2685241itb.0!news-out.google.com!s63ni3332itb.0!nntp.google.com!i6no2685238itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 4 Dec 2017 03:58:46 -0800 (PST) In-Reply-To: <3dcad98b-d517-4c3a-a77b-dd584c143b2c@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83d0:5ce1:f437:98fe:9073:e3b9; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83d0:5ce1:f437:98fe:9073:e3b9 References: <3dcad98b-d517-4c3a-a77b-dd584c143b2c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to tell whether program finalization can be suppressed From: AdaMagica Injection-Date: Mon, 04 Dec 2017 11:58:46 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:49344 Date: 2017-12-04T03:58:46-08:00 List-Id: Am Sonntag, 3. Dezember 2017 18:16:47 UTC+1 schrieb Robert Eachus: > On Saturday, December 2, 2017 at 6:12:13 AM UTC-5, AdaMagica wrote: > >=20 > > Just to refresh my memory: > > The main subprogram is the master of any library tasks. It may be empty= (I just confirmed this with a little test) and thus does not exit until al= l library tasks are terminated or waiting on a terminate alternative. > >=20 > > with Lib; -- in the elaboration sequence, there are some tasks > > procedure Main is > > begin > > null; -- waiting here for tasks to terminate > > end Main; >=20 > No, the environment task is the master of library level tasks. It doesn'= t matter in your test case since the waiting will occur after the main prog= ram completes. If the desire is not to wait after the main program finishe= s, end it with an abort statement. Nicer means of program shutdown when th= e main program completes are left as an exercise for the reader. But that's what Randy wrote: "When the main program exits, of course the environment task completes and = then terminates. It's the completion of the environment task that starts library= -level finalization." So what did he want to say? Main resp. env task exits, completes, terminate= s... Normally, Randy is precise in what he says.