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

Michael Schnell mschnell at lumino.de
Mon Oct 11 10:24:14 CEST 2010


> It is the same old song: absense of centralized event handling in Linux.
> In Windows, the main thread waits with MsgWaitForMultipleObjects, so 
> it remains capable of processing messages, no matter where they come 
> from.
In the current trunk version Sending a Message to the main thread and 
handling it  with "procedure...message" does not work any more in Linux. 
I'm sure it did work with some previous version. With that thread 
generated events could be used in a GUI program.

I thought, TThread.Waitfor would (should) be implemented using this 
mechanism (e.g doing a loop with "Application.PreocessMessages"). With 
that it would not be blocking other event handlers. But Maybe I'm wrong 
and  TThread.Waitfor in fact should block the main thread event handlers...

-Michael




More information about the Lazarus mailing list