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 mk4mr9858600pbc.6.1322856103733; Fri, 02 Dec 2011 12:01:43 -0800 (PST) Path: lh20ni60379pbb.0!nntp.google.com!news1.google.com!postnews.google.com!h3g2000yqa.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Class with task destructor Date: Fri, 2 Dec 2011 11:03:33 -0800 (PST) Organization: http://groups.google.com Message-ID: <209bced9-a293-46ca-8096-6011fe79c813@h3g2000yqa.googlegroups.com> References: <30604696.94.1322013045135.JavaMail.geo-discussion-forums@yqzz20> <24938373.1788.1322615481874.JavaMail.geo-discussion-forums@yqjo5> <05a2f750-fa76-4cd5-9e86-f3a8d22b44fe@s4g2000yqk.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1322856103 7911 127.0.0.1 (2 Dec 2011 20:01:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 2 Dec 2011 20:01:43 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h3g2000yqa.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:19324 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-12-02T11:03:33-08:00 List-Id: On Dec 2, 10:50=A0am, Jeffrey Carter wrote: > On 12/02/2011 09:20 AM, Adam Beneschan wrote: > > > > > > > > > It's not entirely the same, though. =A0In 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. =A0In 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. =A0I'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. =A0Also, 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. > > I didn't recall the specifics of the Ada-95 proposal, nor am I entirely c= lear on > the semantics of ATC. Will the "then abort" part be aborted when the trig= ger > entry is accepted, or when it completes? I had thought it was the latter,= but if > you say otherwise then I'm probably wrong. When it completes--I just checked. That doesn't change the fact that both entry calls could complete, which is probably not what you'd expect from a multi-way entry. But it may be more symmetrical than I thought when I first posted. If either entry call is accepted and *completes*, the other one is cancelled, which succeeds if the other entry call hasn't yet been accepted (or has been requeued with abort). -- Adam