comp.lang.ada
 help / color / mirror / Atom feed
From: "e.coli" <maurizio.ferracini@gmail.com>
Subject: ATC, an  example please.
Date: 30 Jun 2005 01:44:52 -0700
Date: 2005-06-30T01:44:52-07:00	[thread overview]
Message-ID: <1120121092.240284.285260@g14g2000cwa.googlegroups.com> (raw)

how ATC work?
can you fix this example,please?

------------------------------------------------------------------
with Ada.Text_Io;

procedure Atc_Test is

   task A_Task is
      entry Foo;
   end A_Task;

   task body A_Task is
   begin
      loop
         accept Foo;
         Ada.Text_Io.Put_Line("one.start");
         for Iteration in 1..100000 loop
            Ada.Text_Io.Put(".");
         end loop;
         Ada.Text_Io.Put_Line("one.end");
      end loop;
   end A_Task;

begin
   select
      delay 2.0;
      Ada.Text_Io.Put_Line ("Long calculation abandoned");
   then
      abort
      A_Task.Foo;
   end select;
   Ada.Text_Io.Put_Line ("end main");

end Atc_Test;
-----------------------------------------------------------------

best regards
Maurizio




             reply	other threads:[~2005-06-30  8:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30  8:44 e.coli [this message]
2005-06-30  9:32 ` ATC, an example please Dmitry A. Kazakov
2005-06-30  9:59   ` e.coli
2005-06-30 11:06   ` Christoph Grein
2005-06-30 12:55   ` Robert A Duff
2005-06-30 15:29     ` Dmitry A. Kazakov
2005-06-30 20:31       ` Robert A Duff
2005-06-30  9:32 ` e.coli
2005-07-02  8:18 ` Craig Carey
replies disabled

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