[Lazarus] controling a loop

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Aug 11 15:10:25 CEST 2016

On Thu, 11 Aug 2016 14:58:31 +0200
JuuS <JuuS at mykolab.ch> wrote:

> Hi,
> > 
> > Besides the typo ;-) Application.ProcessMessages did the trick. Thanks.
> >   
> Don't know if this is an issue anymore, it was in Delphi some time ago
> so you may want to check:
> It used to be Application.processmessages pegged cpu to 100%. The
> alternative "application.handlemessage" may be a bit slower but much
> nicer on the cpu. Again, don't know if this is an issue in Lazarus.

HandleMessages calls ProcessMessages and then sleeps til a new message.
This is Delphi compatible and by design.

100% cpu without need is bad coding.


More information about the Lazarus mailing list