comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Problem with task component
Date: Tue, 25 Sep 2012 20:35:49 +0200
Date: 2012-09-25T20:35:49+02:00	[thread overview]
Message-ID: <19yadxsixu2y9$.1tfzkylgscckn$.dlg@40tude.net> (raw)
In-Reply-To: k3sr02$qm5$1@dont-email.me

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



  reply	other threads:[~2012-09-25 18:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 18:22 Problem with task component Simon Wright
2012-09-19 18:48 ` Dmitry A. Kazakov
2012-09-19 20:40   ` Simon Wright
2012-09-19 21:11     ` Dmitry A. Kazakov
2012-09-19 21:48       ` Simon Wright
2012-09-24  5:28         ` J-P. Rosen
2012-09-24  8:23           ` Simon Wright
2012-09-24 13:37             ` J-P. Rosen
2012-09-24 14:17               ` Simon Wright
2012-09-24 17:53               ` Robert A Duff
2012-09-24 20:40                 ` J-P. Rosen
2012-09-24 15:44             ` Adam Beneschan
2012-09-24 16:13               ` AdaMagica
2012-09-24 16:43                 ` Adam Beneschan
2012-09-24 16:29               ` Dmitry A. Kazakov
2012-09-24 20:49                 ` J-P. Rosen
2012-09-25  7:35                   ` Dmitry A. Kazakov
2012-09-25 17:52                     ` J-P. Rosen
2012-09-25 18:35                       ` Dmitry A. Kazakov [this message]
2012-09-25 19:22                         ` J-P. Rosen
2012-09-26  7:27                           ` Dmitry A. Kazakov
2012-09-26 11:49                             ` Georg Bauhaus
2012-09-26 14:13                               ` Dmitry A. Kazakov
2012-09-19 19:44 ` Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox