I have found some resources concerning this, like http://www.cs.utsa.edu/~danlo/ada/ada95.htm that recomend a delay 0.0. It's not a serious solution but it runs. Maybe another compiler instead of GNAT takes a better solution? Thanx. "Grein, Christoph" escribi� en el mensaje news:mailman.1038391741.12325.comp.lang.ada@ada.eu.org... > > I'm a beginner and I have a problem. This code makes my CPU reach > > 100%: > > Looks like a bug to me. It should stop at the select and wait until there is an > entry call. Is it possible that there is always a call present? > > What happens if you remove the terminate alternative? Should not really have an > effect, but just to see whether there is a problem in Gnat. > > > > > 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. > > _______________________________________________ > > comp.lang.ada mailing list > > comp.lang.ada@ada.eu.org > > http://ada.eu.org/mailman/listinfo/comp.lang.ada