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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: How to tell whether program finalization can be suppressed Date: Mon, 4 Dec 2017 14:22:51 -0600 Organization: JSA Research & Innovation Message-ID: References: <3dcad98b-d517-4c3a-a77b-dd584c143b2c@googlegroups.com> Injection-Date: Mon, 4 Dec 2017 20:22:51 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="32292"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:49361 Date: 2017-12-04T14:22:51-06:00 List-Id: "AdaMagica" wrote in message news:d9039b0d-993b-49e1-9bde-6a079bddec65@googlegroups.com... ... >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, >terminates... Normally, Randy is precise in what he says. I said it right: the main subprogram exits, the environment task completes, then terminates. In that order, and those are separate things (read RM 10.2 for the details). The environment task calls the main subprogram (this literally happens in the Janus/Ada compiler, the call is generated by the binder, can't speak for other compilers). There's nothing special about the main subprogram (there can't be, since Ada doesn't mark it specially at all), it's just a normal subprogram called by the environment task. Randy.