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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ea9fbf0f08e5af8a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!14g2000prv.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Delayed deallocation of non-terminated task in Gnat? Date: Wed, 31 Aug 2011 15:36:28 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <31ba531d-fa8e-40f3-97bc-c9112b329fe2@14g2000prv.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1314830551 24848 127.0.0.1 (31 Aug 2011 22:42:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 31 Aug 2011 22:42:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 14g2000prv.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20807 Date: 2011-08-31T15:36:28-07:00 List-Id: On Aug 31, 1:30=A0pm, "J-P. Rosen" wrote: > Le 31/08/2011 18:39, Adam Beneschan a =E9crit :> One thing that bothers m= e a bit, although I don't know if it bothers > > me enough to request an RM change: 13.11.2(10) says that after > > Free(X), the designated object and its subcomponents no longer exist. > > 9.1(15-18) says that the content of a task object includes entry > > queues for the task. =A0I'm willing to accept that there is a > > distinction between a task object and a task (or a task execution), > > but if the task object no longer exists, does that mean that the entry > > queues that it contains no longer exist, and that therefore if another > > task Y was waiting on X.all's entry when X was freed, so that the > > entry queue on which Y was sitting no longer exists, does Y's entry > > call get cancelled? =A0Again, I don't think this is the intent, but I'm > > not sure. > > As soon as a task iscompleted, all waiting tasks receive Tasking_Error. > Since the space is (hopefully!) deallocated after the task is completed > (and even terminated), there is no problem. But I'm not talking about a task being completed. It's pretty clear that it's possible to use Unchecked_Deallocation on an object that contains an access to a task, and this Unchecked_Deallocation can complete, without the task being completed. But this means that the task *object* (which isn't the same as a task, I think) ceases to exist, even though the task still hasn't completed; and a literal (but possibly absurd) reading of the RM would mean that the task's entry queues no longer exist (even though the task still hasn't completed), leading to questions about what happens to tasks that are already on those queues. -- Adam