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!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: Fri, 27 Apr 2018 15:52:28 -0500 Organization: JSA Research & Innovation Message-ID: References: <702e2422-a93f-4200-9749-5122c3d0f899@googlegroups.com> <04f19a56-7fab-416e-8ec0-b9a73e239e90@googlegroups.com> Injection-Date: Fri, 27 Apr 2018 20:52:28 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="14216"; 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:51750 Date: 2018-04-27T15:52:28-05:00 List-Id: We were talking about the 90% of cases where "terminate" doesn't work, of course. Not the rare cases where it does. (I've never had one in the tasks I've written.) Randy. "J-P. Rosen" wrote in message news:pbua2d$1rt8$1@gioia.aioe.org... > Le 27/04/2018 à 00:10, Randy Brukardt a écrit : >> So if you declare a task in a block there is no practical way to >> terminate >> it -- ergo, don't do that. :-) >> > Huh? Consider > > declare > task Server is > entry Service; > end Server; > > task body Server is > begin > loop > select > accept Service do ... end Service; > or terminate; > end select; > end loop; > end Server; > begin > ... > Server.Service; > ... > Server.Service; > end; > > The task will terminate nicely when the block is completed. That's what > terminate is for! > > -- > J-P. Rosen > Adalog > 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX > Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 > http://www.adalog.fr