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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5400c39557b9f344 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-07 06:09:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: <8bRwOT7FACB@lemmies.lb.bawue.de> Subject: Re: Multitasking X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1039270151 12.211.13.75 (Sat, 07 Dec 2002 14:09:11 GMT) NNTP-Posting-Date: Sat, 07 Dec 2002 14:09:11 GMT Organization: AT&T Broadband Date: Sat, 07 Dec 2002 14:09:11 GMT Xref: archiver1.google.com comp.lang.ada:31528 Date: 2002-12-07T14:09:11+00:00 List-Id: "arvids lemchens" wrote in message news:8bRwOT7FACB@lemmies.lb.bawue.de... [snip] > > Output is: > ----- > Start Task S at: 46831 > Task S finished at 46891 > End Task S 46891 > Start Task U 46891 > Task S finished at 47011 > End Task U 47011 > ----- > > Now i am wondering why the maintask is waiting for the completion of > S and T and not going independent of them on? > While I'm not certain what you're expecting, the output is exactly what I expect (and get on Gnat 3.15p on W2K). During the rendevous, the part between "accept S" and "end S" in your task, the environment task and Tc do not proceed independently. If you want them to do so change the code to look something like: select accept S ( D : in Positive ) do Local_D := D; end S; delay Standard.Duration(Local_D); Put("Task S finished at "); Put(Long_Long_Integer(Seconds(Clock))); New_Line; or where Local_D is defined as a Positive that is local to the task. If you're wondering why the program doesn't terminate immediately, the environment task will not terminate until the dependent tasks terminate, which happens when your task finishes the delay. SteveD > Am i missing something fundamental about ada-tasks? > > If yes, what and how do i get them running independent? > > If it matters, i am using the linuxversion of gnat 3.14p. > > > MvfG, > > Arvids > > > >