ATC, an example please.



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

.



Relevant Pages

  • Re: shrinker->nr = LONG_MAX means deadlock for icache
    ... If breaking the loop despite we made progress doesn't risk to make us go ... an huge nr value would over-shrink the caches. ... proposed fix was ok. ... status of the kernel that they used has all nr_unused and other icache ...
    (Linux-Kernel)
  • Re: How do you forth experts drop a break_point ?
    ... Say that I believe the problem is at step 2417 of a do loop. ... rummage through it enough to find this error and fix it, chances are ... There's a strong temptation not to do that for commercial code because ... Much more pleasant to think that one last patch will fix ...
    (comp.lang.forth)
  • Ravenscar-compliant bounded buffer
    ... package body Bounded_Buffer is ... task body Writer is ... end loop; ... Protecting this access is not necessary on the basis that binary ...
    (comp.lang.ada)
  • Re: recording with a click (or thumper) track...
    ... Lori Dovi came up with a quick fix on the indie film "Groove", ... The on camera dancers would glance at them once in awhile ... try an induction loop (either ... have to deal with all those dancing feet making noise. ...
    (rec.arts.movies.production.sound)
  • Re: Xnews: Smart decoding doesnot work too well
    ... I think there's mention of the 'loop' syndrome somewhere in the manual ... So, if you've been plagued by this bug, ... Hope the above fix works for you. ... my Xnews.ini misc is here ...
    (news.software.readers)