[Lazarus] Sending messages

Michael Schnell mschnell at lumino.de
Fri Nov 25 09:37:56 CET 2011

On 11/24/2011 08:56 PM, Felipe Monteiro de Carvalho wrote:
> And user code can also start their own loops by using ProcessMessages 
> I wouldn't call those loops "event queues", because they don't 
> implement any kind of queues, they process all events which are 
> obtained immediately. The events are not stored in queues. The queue 
> itself is inside the backend library, for example Windows API, X11, etc. 
I think you chose a quite correct wording: Queue = store for events, 
Loop = functionality that takes events from a queue.

But IMHO (other than Windows) X11 and friends do not provide a relevant 
"queue" (aka store in this meaning) but here the queue(s) is (are) done 
in pascal code and are "attached" to X11 / Widget Set functions, that do 
callbacks to push events into this queue. (In fact it does not matter, 
if the implementation of X11/WidgetSet internally does some delay before 
the callback into the LCL is fired, as the LCL only sees the incoming 
events and (other than with Windows) can't (or in fact does not) issue 
events towards a potential external queue, what LCL sees is a "not 
queuing functionality", and thus needs to provide the event queue(s) itself.


More information about the Lazarus mailing list