comp.lang.ada
 help / color / mirror / Atom feed
* task time-out&abort
@ 2005-06-22 18:08 e.coli
  2005-06-22 18:40 ` Dmitry A. Kazakov
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: e.coli @ 2005-06-22 18:08 UTC (permalink / raw)


here the code...
------------------------------------
with Ada.Text_Io;
with Ada.Task_Identification;

procedure Semplice2 is --processo genitore

   task Un_Task is--specifica
      entry Uno;
      entry Due;
   end Un_Task;

   task body Un_Task is
   begin
      loop
         select
            accept Uno do
               Ada.Text_Io.Put_Line("foo");
            end Uno;
         or
            accept Due do
               Ada.Text_Io.Put_Line("buffering");
               loop           -- ;)
                  delay(0.0);
               end loop;
               Ada.Text_Io.Put_Line("bar");
            end Due;
         end select;
      end loop;
   end Un_Task;

begin --corpo genitore
   Un_Task.Uno;
   Ada.Text_Io.Put_Line ("wait Horribly long calculation");
   select
      delay 5.0;
      Ada.Text_Io.Put_Line ("Horribly long calculation abandoned");
   then abort
      un_task.due;
   end select;
end Semplice2;
-----------------------------------------

but don't work...
how i can do the five second time out?
thanks




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-07-18 16:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-22 18:08 task time-out&abort e.coli
2005-06-22 18:40 ` Dmitry A. Kazakov
2005-06-23 10:11   ` e.coli
2005-06-23 10:59     ` Dmitry A. Kazakov
2005-06-22 19:44 ` Mark Lorenzen
2005-06-23  1:44 ` Steve
2005-06-23 15:26 ` e.coli
2005-06-23 17:01   ` e.coli
2005-06-24 11:42     ` Marius Amado Alves
2005-06-28 21:31       ` Robert A Duff
2005-06-29  0:32         ` Marius Amado Alves
2005-06-29 20:52   ` Robert A Duff
2005-07-18 16:11     ` Robert I. Eachus

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