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,4bd6ca8f7a1eb225 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.209.68 with SMTP id mk4mr9024674pbc.6.1322844356066; Fri, 02 Dec 2011 08:45:56 -0800 (PST) Path: lh20ni59429pbb.0!nntp.google.com!news1.google.com!postnews.google.com!s4g2000yqk.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Class with task destructor Date: Fri, 2 Dec 2011 08:20:43 -0800 (PST) Organization: http://groups.google.com Message-ID: <05a2f750-fa76-4cd5-9e86-f3a8d22b44fe@s4g2000yqk.googlegroups.com> References: <30604696.94.1322013045135.JavaMail.geo-discussion-forums@yqzz20> <24938373.1788.1322615481874.JavaMail.geo-discussion-forums@yqjo5> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1322844355 16903 127.0.0.1 (2 Dec 2011 16:45:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 2 Dec 2011 16:45:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s4g2000yqk.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: news1.google.com comp.lang.ada:19309 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-12-02T08:20:43-08:00 List-Id: On Dec 1, 9:30=A0pm, Jeffrey Carter wrote: > On 12/01/2011 05:50 PM, Randy Brukardt wrote: > > > > > In any case, what a particular target can do is not that relevant to wh= at > > the language design can do. Ada 95 tried to add a multi-way entry call,= and > > every implementer who studied it ended up reporting that the implementa= tion > > would essentially end up being some form of polling. Which is not what > > anyone was hoping for. It got dropped from Ada 95. > > Ada 95 did add asynchronous transfer of control, which does allow an entr= y call > as a trigger, and anything in the "then abort" part, including an entry c= all: > > select > =A0 =A0 Entry_Call_1; > then abort > =A0 =A0 Entry_Call_2; > end select; > > These can be nested as deeply as desired, so it seems that Ada 95 did > effectively add a multi-way entry call. It's not entirely the same, though. In a multi-way entry, if entry Entry_Call_2 becomes available first, then that entry is accepted and Entry_Call_1 can no longer be accepted. In the code you've written above, if Entry_Call_2 is accepted first, but Entry_Call_1 becomes available before the Entry_Call_2 entry is completed, I believe that Entry_Call_1 is accepted and an attempt is made to cancel the call to Entry_Call_2--which probably doesn't succeed unless a requeue is involved, so that the Entry_Call_2 rendezvous still completes, but the Entry_Call_1 rendezvous also takes place. I'm not 100% sure I have the semantics right, but I'm pretty sure the behavior would be different from a true multi-way entry. Also, I have no problem believing that since the behavior of a multi-way entry would be different, the implementation could well be very different from the implementation necessary to implement asynchronous transfer of control. -- Adam