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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!aioe.org!news.etla.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: Finalization of library level tasks Date: Wed, 25 Apr 2018 19:02:10 -0500 Organization: JSA Research & Innovation Message-ID: References: <702e2422-a93f-4200-9749-5122c3d0f899@googlegroups.com> <04f19a56-7fab-416e-8ec0-b9a73e239e90@googlegroups.com> Injection-Date: Thu, 26 Apr 2018 00:02:11 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="22449"; 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:51715 Date: 2018-04-25T19:02:10-05:00 List-Id: "J-P. Rosen" wrote in message news:pb6kuf$jgl$1@gioia.aioe.org... > Le 17/04/2018 à 23:23, Dmitry A. Kazakov a écrit : >> P.S. If "main subprogram complete" should mean "environment task >> complete" that is OK to me. However insane the wording sounds to me only >> the semantics counts. > The paragraph you quote says "has completed", not "complete". Remember, > the main subprogram is called by the environment task. So, the main > subprogram completes and exits, then the environment task waits for > dependents, at which point its 'callable becomes false. > >> Why could not "task complete" mean "will select >> next terminate"? At least it would make some use out of having >> T'Callable. > 'Callable is very useful for regular tasks. Your quote suggests that > there might also be some use for it on the environment task, which is > not obvious. I invented that to get around Dmitry's original problem when I stumbled into it building Claw right after Ada 95 was finished. I was able to convince the ARG that the environment task ought to be completed once the main subprogram exits [that follows from the definition of the environment task], and that one should be able to use Ada.Task_Identification to query that. (You could do it even before the Environment_Task function, you just had to squirrel the environment task id during initial elaboration.) Several compilers didn't do this right, but one of the first things I added to the ACATS after taking over was a test of this case (once the ARG approved the idea, of course). So all modern compilers support the idiom of testing Callable of the environment task. Randy.