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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Natasha Kerensikova Newsgroups: comp.lang.ada Subject: Re: Termination of periodic tasks Date: Tue, 17 Jun 2014 07:47:49 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Injection-Date: Tue, 17 Jun 2014 07:47:49 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="76a49b86bc3e16725b7cfca3d85cb4c8"; logging-data="22748"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sTWRncsOEjWkH/3HQduE/" User-Agent: slrn/1.0.1 (FreeBSD) Cancel-Lock: sha1:cy+iMCDHOVLrVlj+eQTegQeBfYU= Xref: news.eternal-september.org comp.lang.ada:20388 Date: 2014-06-17T07:47:49+00:00 List-Id: Hello, On 2014-06-17, Dmitry A. Kazakov wrote: > On Tue, 17 Jun 2014 06:57:38 +0000 (UTC), Natasha Kerensikova wrote: > > [...] >> Is there a way to work around such a situation? > > The solution is always same: wrap a task pointer in a controlled object. > Manage the task from the object's Initialize and Finalize. > But if I change Global_Worker from an access-to-task to a controlled object, its master will still be the environment task, so Finalize wouldn't be called before termination of the worker task. Or am I missing something? Is there a special construct that yield an earlier call to Finalize than Cron_Entry? Would you happen to have a working example? Thanks for your help, Natasha