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

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Oct 11 12:53:28 CEST 2010


On 11 October 2010 10:24, Michael Schnell <mschnell at lumino.de> wrote:
>
> 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...

I think Thread.WaitFor should trigger an event each time in it's loop.
Thus a developer could hook into that event and call things like
Application.ProcessMessages or whatever else is required to keep the
application from deadlock.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net:8080/fpgui/




More information about the Lazarus mailing list