[fpc-pascal] lnet for TCP daemon

Michael Schnell mschnell at lumino.de
Mon Sep 16 13:38:46 CEST 2013


On 09/16/2013 01:22 PM, Marco van de Voort wrote:
> The non-LCL one must simply call checksynchronize as the blocking part 
> of the mainthread's eventloop.
Thus, my wish already seems to be fulfilled.

Great !

> there is no LCL dependence in theory, but other eventloop systems 
> might assume they themselves implement the blocking part. (e.g. to 
> wake up because of OS messages) Services, console network server 
> implementations etc probably already do that both on Delphi and Lazarus.

In fact the LCL seems to rely on the "It blocks for a maximum time" (as 
you said).

While this might be "good enough" for GUI events, there might be 
instances where we either would want either (1) a faster reaction (than 
the said "maximum time") on events that are not to be pushed through the 
RTL event queue or (2) avoid the processor overhead that is imposed by 
the main thread leaving the block after the "maximum time".

Regarding (2), I suppose it would be just nice to be able to define this 
time (I need to check the sources or the docs to find out).

Regarding (1), I suppose this will be a really rare request (not even 
required by my foreseeable queer projects). I would rather do this kind 
of stuff in worker threads and use TThread.Queue (which hurray !!! is 
available since some time) to schedule main thread actions.

Thanks a lot !
-Michael





More information about the fpc-pascal mailing list