On 12.05.2017 16:37, Michael Van Canneyt wrote:

Check manually. What else is left ? There is no message queue, so no loop in which to check at regular basis.

For event processing in a not threaded project or in the main thread of a threaded project you at best use the Event Queue provided by some Infrastructure library (e.g. LCL or mse). IMHO, SimpleIPC might makes sense, if you don't want to use one of those. (mse and an enhanced NoGui LCL "Widget Type", I have done a working draft for, can provide a message queue even with no binding to a GUI Widget Set).

But when using SimpleIPC for signaling to another process (executable, e.g. a Lazarus "Application" ) I suppose, you need a thread to avoid latency and/or huge CPU demand by polling to transfer the event to the Main Thread via the Event Queue (e.g. by Application.QueueAsyncCall or TTherad.Queue).

-Michael
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to