comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <martin@krischik.com>
Subject: Re: task synchronization and returns in accept
Date: Tue, 08 Feb 2005 16:56:44 +0100
Date: 2005-02-08T16:56:44+01:00	[thread overview]
Message-ID: <2190069.I2Igd2yRta@linux1.krischik.com> (raw)
In-Reply-To: 5f59677c.0502080736.64ead69f@posting.google.com

Evangelista Sami wrote:

> Hello all
> 
> Let's take this piece of code:
> -----------------------------------------
> procedure Test is
>    task type T1;
>    task body T1 is
>    begin
>       null;
>    end;
>    task type T2 is
>       entry E;
>    end T2;
>    task body T2 is
>    begin
>       accept E do
>          declare
>             T : T1;
>          begin
>             return;
>          end;
>       end E;
>    end;
>    My_T2 : T2;
> begin
>    My_T2.E;
> end;
> -----------------------------------------
> 
> what does exactly happen at the "return" statement in the accept.
> does it wait for the termination of task T?

Yes, T2 need to wait for the end of T1 - just as Test need to wait for the
end of T2.

Martin

-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com




      reply	other threads:[~2005-02-08 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-08 15:36 task synchronization and returns in accept Evangelista Sami
2005-02-08 15:56 ` Martin Krischik [this message]
replies disabled

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