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:1fc8:: with SMTP id d191-v6mr2062478itd.52.1524084025064; Wed, 18 Apr 2018 13:40:25 -0700 (PDT) X-Received: by 2002:a9d:4004:: with SMTP id m4-v6mr226135ote.1.1524084024926; Wed, 18 Apr 2018 13:40:24 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!k65-v6no3863227ita.0!news-out.google.com!15-v6ni4567itg.0!nntp.google.com!k65-v6no3863222ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 18 Apr 2018 13:40:24 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83d7:a58d:dcb8:6d43:ca07:b1b; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83d7:a58d:dcb8:6d43:ca07:b1b 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: <17f48c2e-3b2d-434d-b2a2-d2c1a5aea5a8@googlegroups.com> Subject: Re: Finalization of library level tasks From: AdaMagica Injection-Date: Wed, 18 Apr 2018 20:40:25 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3293 X-Received-Body-CRC: 456580194 Xref: reader02.eternal-september.org comp.lang.ada:51618 Date: 2018-04-18T13:40:24-07:00 List-Id: Am Mittwoch, 18. April 2018 16:52:04 UTC+2 schrieb J-P. Rosen: > Le 18/04/2018 =C3=A0 16:12, Dmitry A. Kazakov a =C3=A9crit=C2=A0: > > In pseudo-code: > >=20 > > =C2=A0=C2=A0 task body Worker is > > =C2=A0=C2=A0 begin > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 while the object lives loop > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 do some chunk of work > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 end loop; > > =C2=A0=C2=A0 end Worker; > >=20 > > P.S. I posted an example in a separate thread. The posted solution > > should work except the cases when the access type is at the same level > > as the object and both are below the library level. > >=20 > OK. You were actually quite close... Use a killer task (with the same > master as your worker) like this: >=20 > task Killer is > entry Never_Called; > end Killer; >=20 > task body Killer is > begin > accept Never_Called; > exception > when Tasking_Error =3D> > -- Kill the other task > end Killer; >=20 > Hint: when the master completes, Tasking_Error is raised in all tasks > waiting on entries that depend on that master. I do not understand how this is supposed to work.