task synchronization and returns in accept

From: Evangelista Sami (evangeli_at_cnam.fr)
Date: 02/08/05


Date: 8 Feb 2005 07:36:11 -0800

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?

Thanks for any help

Sami



Relevant Pages

  • Concurrency and interfaces
    ... procedure Init ... entry Init; ... task type T12 is new Int1 and Int2 with ... task body T11 is ...
    (comp.lang.ada)
  • Re: Tasks problem
    ... > How do I manage the tasks allocations? ... > entry in the T_CHeck task that notified it. ... -- No need for a task type if you are only going to have one of them ... task body T_Manager is ...
    (comp.lang.ada)
  • Re: task synchronization and returns in accept
    ... Evangelista Sami wrote: ... > procedure Test is ... > task body T1 is ... > task type T2 is ...
    (comp.lang.ada)
  • Re: Why was it done this way ?
    ... This may be a silly question but I'm sure there was reasoning behind ... task type T1; ... task body T1 is ...
    (comp.lang.ada)
  • in-out and out parameters
    ... task body T is ... so i was expecting to ... If someone had a clear explanation i would be very thankful. ...
    (comp.lang.ada)