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:a6b:b5c1:: with SMTP id e184-v6mr464793iof.18.1524038780271; Wed, 18 Apr 2018 01:06:20 -0700 (PDT) X-Received: by 2002:a9d:6186:: with SMTP id g6-v6mr71836otk.7.1524038780089; Wed, 18 Apr 2018 01:06:20 -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!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!f63-v6no121376itc.0!news-out.google.com!15-v6ni4225itg.0!nntp.google.com!k65-v6no3495046ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 18 Apr 2018 01:06:19 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83d7:a504:c9de:60dc:69bb:f984; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83d7:a504:c9de:60dc:69bb:f984 References: <702e2422-a93f-4200-9749-5122c3d0f899@googlegroups.com> <04f19a56-7fab-416e-8ec0-b9a73e239e90@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Finalization of library level tasks From: AdaMagica Injection-Date: Wed, 18 Apr 2018 08:06:20 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3266 X-Received-Body-CRC: 3341111749 Xref: reader02.eternal-september.org comp.lang.ada:51576 Date: 2018-04-18T01:06:19-07:00 List-Id: Am Dienstag, 17. April 2018 14:31:24 UTC+2 schrieb Dmitry A. Kazakov: > On 17/04/2018 11:51, AdaMagica wrote: >>>> task body T is >>>> begin >>>> loop >>>> exit when not T'Callable; >>>> ... -- Do something >>>> end loop; >>>> end T; > > As I understand RM 9.3, when this task T is going out of scope, i.e. if= it is declared inside for instance in a block, the block can only be left = when the task is completed (the block is the master, see 7.6.1), and I cann= ot see that the conditions on T to be completed can ever be fulfilled for T= . >=20 > Quite naturally, when the master is being finalized it marks the task as= =20 > terminating and waits for its completion. The task marked for=20 > termination has T'Callable false and so terminates. Dmitry, please quote the RM where you can find this rule - I'm certain you = will not find it. Your model of tasking in Ada is not completely in line with the RM. T'Callable is true as long as the T has not finished its body, and there is= an infinite loop, so it cannot stop. > The meaning of > > select > terminate; > else > null; > end select; > > is crystal clear: continue if no master did request termination else > continue. Again, I thought that T'Callable were there to determine if a > master wants the task to terminate. RM is silent about that. Even for > the environment task it is in a side note. May be in your mind, but not in the RM. Your model is wrong.