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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5cc10500d0b7a280,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!f16g2000yqm.googlegroups.com!not-for-mail From: Mike Newsgroups: comp.lang.ada Subject: task model Date: Thu, 15 Oct 2009 10:43:32 -0700 (PDT) Organization: http://groups.google.com Message-ID: <04458a0b-1e58-478b-a2f0-c47226f840ac@f16g2000yqm.googlegroups.com> NNTP-Posting-Host: 157.127.155.214 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1255628612 27396 127.0.0.1 (15 Oct 2009 17:43:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 15 Oct 2009 17:43:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f16g2000yqm.googlegroups.com; posting-host=157.127.155.214; posting-account=75iYsQoAAABUEoLZrxFNnZsTxbZSb5pV User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8701 Date: 2009-10-15T10:43:32-07:00 List-Id: I'm prototyping some tasking with multiple accepts, the code is as follows: with Ada.Text_Io; use Ada.Text_Io; procedure task_test is procedure Process_Primary(node: in Integer) is begin Put_Line("This is number" & Integer'Image(node)); end Process_Primary; task proc1 is entry process1(node : Integer); entry continue; end proc1; task body proc1 is begin accept process1( node : Integer) do Process_Primary( node ); end; accept continue do Put_Line("Called Continue task1"); end; end proc1; task proc2 is entry process2(node : Integer); entry continue; end proc2; task body proc2 is begin accept process2( node : Integer) do Process_Primary( node ); end; accept continue do Put_Line("Called Continue task2"); end; end proc2; begin for i in 1..2 loop proc1.process1(1); proc2.process2(2); proc1.continue; proc2.continue; end loop; end task_test; --------------------------------------------------------------------------------------------------------------------- I get the out put I expect: This is number 1 This is number 2 Called Continue task1 Called Continue task2 But I also get the following error which I can't track down: raised TASKING_ERROR : s-tasren.adb:486 I'm running on a Xeon blade with gnat under linux Thanks Mike