[Lazarus] TThread.WaitFor blocks the main event loop under Linux

Michael Schnell mschnell at lumino.de
Tue Oct 12 12:00:21 CEST 2010


  On 10/12/2010 11:43 AM, Michael Van Canneyt wrote:
>
>
>
> There must be another call as well, I assume Synchronize(), in the thread
> that you are waiting on.

Why should Synchronize deadlock a Waitfor ? I understand that in Waitfor 
other main thread events (e.g. Gui generated ones) should run. 
Synchronize stalls the thread until the appropriate main thread event 
handler (given as a parameter with Sychronize) has been run. If 
MainThread Events do run in WaitFor there is no need for an (additional) 
chance for a  deadlock.

-Michael






More information about the Lazarus mailing list