[fpc-pascal] lnet for TCP daemon

Sven Barth pascaldragon at googlemail.com
Mon Sep 16 14:01:39 CEST 2013


Am 16.09.2013 13:22, schrieb Marco van de Voort:
>> Did I understand you correctly that there is a "notifying" procedure,
>> that is called by the Event queuing mechanism each time an event is
>> pushed onto the queue ?
> That was not me, but Sven or sb else. But as I understood it, the queue
> method does that internally(thus platform dependent). He never said it was a
> public option. You trigger it by queue()ing or synchronize()ing.
I did not say it explicitely, but meant it that way. See WakeMainThread 
( http://www.freepascal.org/docs-html/rtl/classes/wakemainthread.html ).
>> This procedure then would potentially be called from Worker threads and
>> thus here, we need use the OS to schedule the (later to be done) queue
>> poll by the main thread via checksynchronize().
> No. The mainthread simply should always loop around checksynchronize while
> idle. Checksynchronize is the delay in the event loop so to say, by blocking
> on some internal event. Thus if something is queued, the event is triggered
> and the mainthread will wake up immediately (if it was indeed blocked on
> checksynchronize)
WakeMainThread is used by the LCL to initiate an idle-event (whatever an 
"event" is for the underlying widgetset) so that CheckSynchronize gets 
executed.

Regards,
Sven



More information about the fpc-pascal mailing list