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

Michael Schnell mschnell at lumino.de
Wed Oct 13 16:55:02 CEST 2010


  On 10/12/2010 01:06 PM, Michael Van Canneyt wrote:
>
>
>
> So strictly speaking, your (or tiOPF's) code is assuming something 
> which is
> in no way guaranteed by the API, and thus create deadlock.

Obviously you are right. But I don't see how WaitFor can at all be used 
with a thread that does Synchronize in it's loop, if the implementation 
does not provide for having synchronized methods executed while the Main 
Thread is in a WaitFor. So such an implementation would render WaitFor 
useless and it should be removed or documented "don't use".

-Michael




More information about the Lazarus mailing list