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!x11g2000prb.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 16:28:21 -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 1314833301 20516 127.0.0.1 (31 Aug 2011 23:28:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 31 Aug 2011 23:28:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x11g2000prb.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:20808 Date: 2011-08-31T16:28:21-07:00 List-Id: On Aug 31, 11:21=A0am, Robert A Duff wrote: > Adam Beneschan writes: > > Actually, I just found this in the Ada 83 manual (13.10.1(8)): > > > "If X designates a task object, the call FREE(X) [where FREE is an > > instance of Unchecked_Deallocation] has no effect on the task > > desginated by the value of the task object. =A0The same holds for any > > subcomponent of the object designated by X, if this subcomponent is a > > task object." > > > This language got dropped in Ada 95, but I think it was intended that > > these still be the semantics, for a task without discriminants (Ada 83 > > did not allow task discriminants). =A0I'm not sure why the language was > > omitted; ... > > It might have to do with the fact that task values don't formally > "designate" anymore. But access objects do, and in the RM83 paragraph, X is an access object. >=A0Anyway, it doesn't need to say anything. > If it doesn't say anything happens to the task, then nothing > happens -- it just keeps running. =A0It doesn't say U_D waits > for it to terminate. =A0It doesn't say U_D aborts it. =A0It doesn't > say that U_D should set all variables to 17. =A0So none of these > things happen. Perhaps. But the fact that we've seen two different incorrect assumptions about what this does to the task (one thought the task would immediately terminate, as if it were aborted, and another thought it would wait for the task to terminate) means that maybe it would be helpful to add the RM83 language back in (for nondiscriminated tasks). By the way, the only way one can know that the RM doesn't say anything happens to the task is to read and fully understand the entire RM, since otherwise one never knows what other semantics there are elsewhere in the RM that may answer the question or that may combine to give an answer to the question. I studied 7.6.1 and several sections in Chapter 9 pretty thoroughly before concluding that the RM didn't say that anything happened to the task. And that's not helpful to someone who's consulting the RM to try to find out how things work. Keep in mind that the R in RM does stand for something. -- Adam