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,a023f5759065182 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-27 06:41:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!sccrnsc03.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: Subject: Re: Selective accept in Ada tasking 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 1038408091 12.211.13.75 (Wed, 27 Nov 2002 14:41:31 GMT) NNTP-Posting-Date: Wed, 27 Nov 2002 14:41:31 GMT Organization: AT&T Broadband Date: Wed, 27 Nov 2002 14:41:36 GMT Xref: archiver1.google.com comp.lang.ada:31253 Date: 2002-11-27T14:41:36+00:00 List-Id: Please provide a complete sample program that illustrates the problem and is ready to compile. I tested your sample after adding a dozen lines of code to turn it into a program that compiles it ran flawlessly on W2k compiled with Gnat 3.15p. SteveD "Ivan Paniagua" wrote in message news:c560b18f.0211270022.72569d49@posting.google.com... > I'm a beginner and I have a problem. This code makes my CPU reach > 100%: > > task body Man_Motor1 is > begin > while not Fin loop > select > accept Subir; > null; -- Some actions > or > accept Bajar; > null; -- Some actions > or > accept Parar; > null; -- Some actions > or > terminate; > end select; > end loop; > end Man_Motor1; > > I'm using GNAT 3.14 in a Windows XP platform. If I introduce a delay > before de end loop all it's OK, but what I want is that the task keep > sleeping till it has a call to an entry without consuming a lot of CPU > time. > > Can anybody help me? > Thank you very much.