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: a07f3367d7,c33f8f65997c21d0 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.181.11.234 with SMTP id el10mr2540747wid.2.1348598153228; Tue, 25 Sep 2012 11:35:53 -0700 (PDT) Path: ed8ni55756364wib.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Problem with task component Date: Tue, 25 Sep 2012 20:35:49 +0200 Organization: cbb software GmbH Message-ID: <19yadxsixu2y9$.1tfzkylgscckn$.dlg@40tude.net> References: <1667b8e2qt7ei$.1gg1h3hrp9amz$.dlg@40tude.net> <187uk10m6z8xj.yr1cpbgrdur$.dlg@40tude.net> <1gq5enrpptnql.v7pdz1umht4a$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 9A8bJrx4NhDLcSmbrb6AdA.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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2012-09-25T20:35:49+02:00 List-Id: On Tue, 25 Sep 2012 19:52:01 +0200, J-P. Rosen wrote: > Le 25/09/2012 09:35, Dmitry A. Kazakov a �crit : >> I propose a competing rule: >> >> Selection of the terminate alternative by the master shall not depend on >> the states of the client tasks. > But that's the whole purpose of the terminate alternative: to terminate > a task if no client can call it. How can you decide that without > considering the state of client tasks? I need not to consider that. Termination of a task is normally determined solely by its master (terminating) and its internal state (open terminate alternative). I.e. strictly top-down. I understand the motivation of the schema you described. Unfortunately, this approach seems useless for real-life design of tasking applications, which rather use the top-down approach to ensure proper termination of tasks. And clients calling to the master is a bad idea anyway, a tight coupling etc. > You might be considering something that could be useful, but is not > related to the terminate alternative as defined by Ada... Yes. One could introduce T'Terminate and class-wide destructors leaving terminate alternatives as-is. A class-wide destructor will simply call to some user-defined entry to terminate a component task, which most people do anyway. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de