From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3b69de4361f731f1,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail From: "e.coli" Newsgroups: comp.lang.ada Subject: ATC, an example please. Date: 30 Jun 2005 01:44:52 -0700 Organization: http://groups.google.com Message-ID: <1120121092.240284.285260@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: 213.215.153.30 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1120121097 22158 127.0.0.1 (30 Jun 2005 08:44:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 30 Jun 2005 08:44:57 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=213.215.153.30; posting-account=OjhBzA0AAAC7IWpsLrvIpzjmXdzmh93y Xref: g2news1.google.com comp.lang.ada:11754 Date: 2005-06-30T01:44:52-07:00 List-Id: 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