From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:1914:b0:6ce:5ac8:3b4f with SMTP id bj20-20020a05620a191400b006ce5ac83b4fmr9630136qkb.627.1664635545627; Sat, 01 Oct 2022 07:45:45 -0700 (PDT) X-Received: by 2002:a05:6214:4108:b0:4ac:b91b:5afd with SMTP id kc8-20020a056214410800b004acb91b5afdmr10926136qvb.49.1664635545447; Sat, 01 Oct 2022 07:45:45 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 1 Oct 2022 07:45:45 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:810:89e0:44d7:2f0e:881c:ef2f; posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH NNTP-Posting-Host: 2a01:e0a:810:89e0:44d7:2f0e:881c:ef2f References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Freeing access-to-task objects From: Emmanuel Briot Injection-Date: Sat, 01 Oct 2022 14:45:45 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2055 Xref: reader01.eternal-september.org comp.lang.ada:64473 List-Id: I did not mention it in the blog, but we also like running with the restric= tion No_Task_Hierarchy (which generates slightly more efficient code, at le= ast in older versions of GNAT if I understand correctly the reasons we have= it). So the declare block approach doesn't work, this is one of the big re= asons for using access-to-task, too. Waiting for exceptions is one possibility, though I dislike it because this= is using exceptions for what is the normal flow of the program. They also = make debugging more complicated. The active loop is not the best solution, but it isn't very costly in pract= ice. The task terminates fairly soon (depending on the load on the machine)= , and we could possibly use a delay like 1.0 if we basically want the activ= e loop.