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.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a023f5759065182,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-27 00:23:24 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: paniaguaivan@hotmail.com (Ivan Paniagua) Newsgroups: comp.lang.ada Subject: Selective accept in Ada tasking Date: 27 Nov 2002 00:22:41 -0800 Organization: http://groups.google.com/ Message-ID: NNTP-Posting-Host: 62.42.228.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1038385361 24698 127.0.0.1 (27 Nov 2002 08:22:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 27 Nov 2002 08:22:41 GMT Xref: archiver1.google.com comp.lang.ada:31243 Date: 2002-11-27T08:22:41+00:00 List-Id: 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.