[fpc-devel] TCustomApplication

Michael Van Canneyt michael at freepascal.org
Mon Aug 19 14:35:25 CEST 2013



On Mon, 19 Aug 2013, Michael Schnell wrote:

> On 08/19/2013 01:47 PM, Michael Van Canneyt wrote:
>> 
>> YOU DO NOT NEED TO DO THIS.
>> 
>> Just implement the loop and let it call CheckSynchronize at regular 
>> intervals.
>> All the rest will be done for you.
>> 
> Did you ever do embedded software ?

Yes.

>
> The result of the event in the main queue is not having something displayed 
> to a human, but may be a command to the attached "machine", which might be 
> really fast.
>
> Thus regular polling is an absolute no-go here.
>
> Doing the polling "slow" results in huge latency regarding the events.
>
> Doing the polling "fast" results in a huge processor overhead and thus in a 
> huge overhead regarding anything else that the CPU is supposed to do.

So what ? That's a detail of the event loop.

It has nothing to do with the mechanism of threads.

Michael.



More information about the fpc-devel mailing list