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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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.15.105 with SMTP id w9mr9416129pbc.7.1322848956497; Fri, 02 Dec 2011 10:02:36 -0800 (PST) Path: lh20ni59800pbb.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Class with task destructor Date: Fri, 2 Dec 2011 19:01:13 +0100 Organization: cbb software GmbH Message-ID: <1wdqmij3pvk21.xxykxydlrctw.dlg@40tude.net> 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> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: Ddn2Oe3O/2ibyPd3ijr2kg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:19315 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2011-12-02T19:01:13+01:00 List-Id: On Fri, 2 Dec 2011 08:20:43 -0800 (PST), Adam Beneschan wrote: > On Dec 1, 9:30�pm, 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 what >>> 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 implementation >>> 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 entry call >> as a trigger, and anything in the "then abort" part, including an entry call: >> >> select >> � � Entry_Call_1; >> then abort >> � � 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. > 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. I am uncomfortable with the semantics that allows aborting a rendezvous. It is also unclear what happens when Entry_Call_1 re-queues without about. I guess that should not be abortable. That was the "ANY" entry call. There also exists "ALL" entries call. That is when the task engages a rendezvous with multiple tasks and/or executes protected actions on multiple objects. E.g. 1. it awaits entries of all specified tasks and/or barriers of the protected objects' entries; 2. the tasks are blocked and/or protected actions are started; 3. entries are executed in an unspecified order; 4. tasks are released and/or protected actions are completed. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de