comp.lang.ada
 help / color / mirror / Atom feed
From: Emmanuel Briot <briot.emmanuel@gmail.com>
Subject: Re: Freeing access-to-task objects
Date: Sat, 1 Oct 2022 07:45:45 -0700 (PDT)	[thread overview]
Message-ID: <b9f19317-5692-4f9c-8fb0-f9809b4b3575n@googlegroups.com> (raw)
In-Reply-To: <th9h7l$1bltq$1@dont-email.me>

I did not mention it in the blog, but we also like running with the restriction No_Task_Hierarchy (which generates slightly more efficient code, at least 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 reasons 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 practice. 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 active loop.

  reply	other threads:[~2022-10-01 14:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 10:16 Freeing access-to-task objects Emmanuel Briot
2022-10-01 11:40 ` J-P. Rosen
2022-10-01 11:58   ` Dmitry A. Kazakov
2022-10-01 21:26     ` Björn Lundin
2022-10-01 14:01   ` Jeffrey R.Carter
2022-10-01 14:45     ` Emmanuel Briot [this message]
2022-10-09 16:10     ` Stephen Leake
2022-10-09 19:42       ` Jeffrey R.Carter
2022-10-10  8:13         ` Simon Wright
2022-10-10 16:35           ` Jeffrey R.Carter
2022-10-10 20:23       ` AdaMagica
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox