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: border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Termination of periodic tasks Date: Tue, 17 Jun 2014 15:03:03 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1403035383 15124 69.95.181.76 (17 Jun 2014 20:03:03 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 17 Jun 2014 20:03:03 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 2380 Xref: number.nntp.dca.giganews.com comp.lang.ada:187031 Date: 2014-06-17T15:03:03-05:00 List-Id: "Jeffrey Carter" wrote in message news:lnpvb7$oat$3@dont-email.me... > On 06/16/2014 11:57 PM, Natasha Kerensikova wrote: >> >> Now the master of Global_Entry is also the environment task. So >> Global_Entry will not be finalized before the worker task terminates, >> but by design the worker task will not terminate before Global_Entry is >> finalized or Reset. >> >> So unless at some point Global_Entry.Reset is called, this package will >> cause the program to never terminate. >> >> Is there a way to work around such a situation? Or should I just >> document this as a caveat (among many others, as you can see at the >> beginning of the spec)? > > AFAICT, there is no way for this situation to terminate without outside > intervention. That's certainly true for this code as written, but there is a way to write the code so it will terminate. See my other message. Note that you need both methods if you want to allow the objects to be declared anywhere: finalization for objects in nested scopes, and the Is_Callable trick for those declared at library-level. Randy.