[Lazarus] TThread.Synchronize

Michael Schnell mschnell at lumino.de
Tue Nov 8 12:59:06 CET 2016


On 25.10.2016 14:07, LacaK via Lazarus wrote:
>
> Yes this can happen.
> MyForm.MyMethod is called also from event handler and also is used in 
> Synchronize(@MyForm.MyMethod)
> How can this happen/play role?
I suppose by "event handler" you mean a GUI event (Mouse, Keyboard, ...)
Such events are serviced by the Queue as well and hence run in the same 
Thread ("MainThread" as the synchronized methods. So there can't be a 
mutual interrupt.

The whole point with the Event programming paradigm is to do "run to 
completion" events.

-Michael


More information about the Lazarus mailing list