[Lazarus] PostMessage return value

Michael Schnell mschnell at lumino.de
Fri Sep 19 15:48:34 CEST 2014


On 09/19/2014 02:48 PM, Xiangrong Fang wrote:
>
>
> As far as I tried, you cannot use RTLEventWaitFor in main thread, 
> otherwise the gui will freeze.

Of course I did not do this. I used TEvent.Waitfor and I only used it in 
the Execute function of the worker Threads .

Supposedly the problem was that the Worker Threads I created already ran 
in a loop while the GUI constructed the Form and for an unknown reason 
the GUI Thread did not get enough time slices to ever get done with it's 
work.

Anyway, after correctly managing the worker Threads everything is fine.

I can post this version of the TThreadPool class here, if you might want 
to try it. I'd be very interested in knowing if the project works 
correctly on your (64 bit) systems.

-Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140919/1f9feaec/attachment-0003.html>


More information about the Lazarus mailing list