From: Simon Wright <simon@pushface.org>
Subject: Re: Problem with task component
Date: Mon, 24 Sep 2012 15:17:19 +0100
Date: 2012-09-24T15:17:19+01:00 [thread overview]
Message-ID: <m2mx0f7bf4.fsf@pushface.org> (raw)
In-Reply-To: k3pnmv$o94$1@dont-email.me
"J-P. Rosen" <rosen@adalog.fr> writes:
> The principle of the "terminate" is that a task terminates
> automatically if it can be proven that its entries cannot be called.
If that's the case, why do we need to say so?!
I asked earlier whether a select with an accept/terminate body would
behave as I wanted, and wrote this:
procedure Termination is
task type T is
entry Stop;
end T;
type R is limited record
The_T : T;
end record;
task body T is
begin
loop
select
accept Stop;
or
terminate;
end select;
end loop;
end T;
The_R : R;
begin
null;
end Termination;
which does indeed manage to run to completion and return to the command
line.
On thinking about it, I can see that a whole class of toy programs that
demonstrate tasking would have to replace the 'null;' body above with
'delay 1_000_000.0;' if the language worked the way I had hoped.
Until about 10 years ago, my main procedures were exactly like that!
next prev parent reply other threads:[~2012-09-29 17:21 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 [this message]
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
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