On Wed, 26 Oct 2016 09:49:44 +0200
LacaK via Lazarus <lazarus@lists.lazarus-ide.org> wrote:

> >>> ShowModal() for a modal form will call it.  
>[...]
> I did test in Delphi and Delphi seems also perform synchronize upon 
> ShowModal

Yes.


> > Nowhere is it stated or guaranteed that synchronisation cannot happen 
> > in a GUI event
> > handler.   
> 
> But cann't happen if nobody calls ProcessMessages or CheckSynchronize 
> explicitly.
> So if user code is executed in event handler then this execution cann't 
> be interrupted by thread waiting for "synchronization"

Yes. 
Unless you call something that does call HandleMessages/ProcessMessages
or CheckSynchronize.

 
> > Any code at any time can call the GUI message loop. A modal form is
> > just one instance.  
> 
> ModalForm is IMO one example but may be alone in LCL ... as there are no 
> more controls which do same, does not ?

The dialogs like TOpenDialog and ShowMessage call it.
Another example is reading the Clipboard on gtk and retrieving files in
TShellTreeView.


Mattias
-- 
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to