[Lazarus] Most efficient way for polling (TTimer, OnIdle, TIdleTimer, TThread)

Michael Schnell mschnell at lumino.de
Fri Oct 14 10:13:13 CEST 2016


On 14.10.2016 00:18, Luiz Americo Pereira Camara via Lazarus wrote:

> I have a component that needs to poll a SimpleIPC server repeatedly 
> (at each 1s or so).
While I do think that polling once a second will not do any noticeable 
harm, a better design might be to push some kind of message from the 
other site and wait for same in a function that does an appropriate OS 
call.

(E.g a TThread doing a blocking wait for a pipe and then using 
TThread.Queue to call an event handler function in the main thread.)

-Michael


More information about the Lazarus mailing list