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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5d2497ba586c81d1,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-19 09:55:26 PST From: "Ratson Janiv" Newsgroups: comp.lang.ada Subject: Run-Time is stuck - tasks Date: Fri, 19 Dec 2003 19:52:32 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 82-166-194-25.barak.net.il X-Original-NNTP-Posting-Host: 82-166-194-25.barak.net.il Message-ID: <3fe33b68$1@news.barak.net.il> X-Trace: news.barak.net.il 1071856488 82-166-194-25.barak.net.il (19 Dec 2003 19:54:48 +0300) X-Original-Trace: 19 Dec 2003 19:54:48 +0300, 82-166-194-25.barak.net.il Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!ash.uu.net!news.splitrock.net!nntp02.mcleodusa.net!dimaggio.newszilla.com!sinatra.newszilla.com!news.barak.net.il!not-for-mail Xref: archiver1.google.com comp.lang.ada:3575 Date: 2003-12-19T19:52:32+02:00 List-Id: My Task: ==================================================================== begin while not Done loop select accept Check(I:Integer;A: in out Arr) do Ada.Text_Io.Put("Check has started "); Ada.Text_Io.Put_Line("I = " & Natural'Image(I)); Tmp_I := I; end Check; for J in 2..Tmp_I-1 loop if(Tmp_I mod J = 0) then Is_Prime := False; end if; end loop; case Tmp_I is when 1 => Tmp_I := 200000; when 2 => Tmp_I := 2000000; when 3 => Tmp_I := 17163282; when 4 => Tmp_I := 7634; when 5 => Tmp_I := 8728222; when 6 => Tmp_I := 99999999; when 7 => Tmp_I := 1; when 8 => Tmp_I := 837493; when others => Tmp_I := 0; end case; for J in 1..Tmp_I loop O := Tmp_I + 1 + 1 - 1 ; end loop; accept Update(A: in out Arr) do Ada.Text_Io.Put("Check has Ended "); A(Tmp_I) := Is_Prime; Ada.Text_Io.Put("Check has Ended2 "); Ada.Text_Io.Put_Line("I = " & Natural'Image(Tmp_I)); Done := True; end Update; end select; end loop; end T_Check; ============================================================================ = the caller task: **************************************************************************** * while Num <= M loop if(I >= N) then I := 1; end if; Arr_Checks(I).Check(Num,Arr_Results); Ada.Text_Io.Put_Line("Manager has returned"); Arr_Checks(I).Update(Arr_Results); Num := Num + 1; I := I + 1; end loop; **************************************************************************** ** It prints on the screen : ------------------------------------------------------- Manager has started => N = 8 M = 100 Check has started I = 1 Manager has returned Check has Ended --------------------------------------------------------- it means that it is stuck on the Check has Ended2 row, why ? thanks a lot, Janiv.