comp.lang.ada
 help / color / mirror / Atom feed
From: "SteveD" <nospam_steved94@attbi.com>
Subject: Re: Selective accept in Ada tasking
Date: Wed, 27 Nov 2002 14:41:36 GMT
Date: 2002-11-27T14:41:36+00:00	[thread overview]
Message-ID: <vQ4F9.155016$nB.12879@sccrnsc03> (raw)
In-Reply-To: c560b18f.0211270022.72569d49@posting.google.com

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" <paniaguaivan@hotmail.com> 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.





  parent reply	other threads:[~2002-11-27 14:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-27  8:22 Selective accept in Ada tasking Ivan Paniagua
2002-11-27  9:33 ` Peter Hermann
2002-11-27 14:41 ` SteveD [this message]
2002-11-27 16:14 ` tmoran
2002-11-29  7:02   ` Ivan
  -- strict thread matches above, loose matches on Subject: below --
2002-11-27 10:02 Grein, Christoph
2002-11-27 14:17 ` Ivan
2002-11-27 14:56   ` Preben Randhol
2002-11-27 15:02 ` Adrian Knoth
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox